pub struct Element {
pub tag: String,
pub attrs: Attributes,
pub children: Vec<Element>,
pub interpolations: Vec<InterpolationSlot>,
pub frag_use: Option<Box<FragmentUse>>,
}Expand description
One node in the IR tree.
Fields§
§tag: StringTag name (root, column, tile, label, …).
attrs: AttributesResolved attribute bag in normalized form.
children: Vec<Element>Children, in source order.
interpolations: Vec<InterpolationSlot>Round-8 wave-C: catalog of {...} placeholder slots that appear in
this element’s string-valued attributes (text, id, classes, …).
Populated by the parser so the spawner / for-block reconciler can
look up which scope to resolve each placeholder from instead of
falling back to substring replace against the global signal map.
Order matches first-appearance source order across the scanned attribute set; duplicates inside the same element collapse to one entry. Empty for elements with no interpolation sites.
frag_use: Option<Box<FragmentUse>>Set when this element instantiates a fragment rather than rendering
itself. None on every ordinary element, which is nearly all of
them; boxed so carrying the possibility costs one pointer on an
element the <for> reconciler deep-clones per row.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
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>,
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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> FromTemplate for T
impl<T> FromTemplate for T
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.