pub enum InterpolationSlot {
Global(String),
Row(String),
RowIndex,
SelfField(String),
ParentField(String),
Arg(String),
}Expand description
Round-8 wave-C: classification of a {...} placeholder inside markup.
Carries the resolution scope the spawner consults when materializing
the slot into a concrete string.
Global("name")-{$name}or the legacy bare{name}. Resolves againstlumen_core::signals::Signals(the global signal map).Row("field")-{row.field}, only meaningful inside a<for>body. Resolves against the current iteration’slumen_core::signals::ArrayItemrecord. Crucially does not fall through to globals when the row record is missing the field - that substitution emits empty string and a one-shottracing::warn!.RowIndex-{$index}(preferred) or the legacy{idx}alias. Resolves to the 0-based iteration index, stringified.SelfField("f")/ParentField("f")-{$self.f}/{$parent.f}. Stub today; the per-entity consumer system lands in a follow-up wave. Substitutes empty string and emits a debug trace.Arg("name")- a fragment parameter, resolved from the arguments the use site passed. Only a fragment body carries these: the classifier below cannot produce one, because telling a parameter from a global needs the enclosing fragment’s parameter list, which it cannot see. The fragment builder rewritesGlobaltoArgfor each declared parameter once that scope is known.
Variants§
Global(String)
{$name} or {name} legacy shorthand - global signal lookup.
Row(String)
{row.field} - iteration-scope field lookup. <for> body only.
RowIndex
{$index} or {idx} legacy alias - 0-based iteration index.
SelfField(String)
{$self.field} - per-entity field lookup. Stubbed today.
ParentField(String)
{$parent.field} - parent-entity field lookup. Stubbed today.
Arg(String)
A fragment parameter, resolved from the instantiating
FragmentUse::args or the parameter’s declared default.
Trait Implementations§
Source§impl Clone for InterpolationSlot
impl Clone for InterpolationSlot
Source§fn clone(&self) -> InterpolationSlot
fn clone(&self) -> InterpolationSlot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InterpolationSlot
impl Debug for InterpolationSlot
Source§impl<'de> Deserialize<'de> for InterpolationSlot
impl<'de> Deserialize<'de> for InterpolationSlot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<&str> for InterpolationSlot
impl From<&str> for InterpolationSlot
Source§fn from(inner: &str) -> Self
fn from(inner: &str) -> Self
Classify a placeholder’s trimmed inner body (without the
surrounding {...}). The parser’s interpolation walker uses this
to convert each placeholder it finds into a typed slot:
"$index"/"idx"->InterpolationSlot::RowIndex."$self.<f>"->InterpolationSlot::SelfField."$parent.<f>"->InterpolationSlot::ParentField."row.<f>"->InterpolationSlot::Row."$name"/"name"->InterpolationSlot::Global.
InterpolationSlot::Arg is never produced here: a parameter
reference is spelled the same as a global, and only the enclosing
fragment’s parameter list separates them.
Source§impl PartialEq for InterpolationSlot
impl PartialEq for InterpolationSlot
Source§fn eq(&self, other: &InterpolationSlot) -> bool
fn eq(&self, other: &InterpolationSlot) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for InterpolationSlot
impl Serialize for InterpolationSlot
impl Eq for InterpolationSlot
impl StructuralPartialEq for InterpolationSlot
Auto Trait Implementations§
impl Freeze for InterpolationSlot
impl RefUnwindSafe for InterpolationSlot
impl Send for InterpolationSlot
impl Sync for InterpolationSlot
impl Unpin for InterpolationSlot
impl UnsafeUnpin for InterpolationSlot
impl UnwindSafe for InterpolationSlot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.