pub struct Template { /* private fields */ }Expand description
A static layout of a UI tree.
Templates describe the stable parts of a view while runtime values provide the dynamic nodes and attributes for each render.
Implementations§
Source§impl Template
impl Template
Sourcepub fn decoded_ops(&self) -> impl ExactSizeIterator
pub fn decoded_ops(&self) -> impl ExactSizeIterator
Iterate decoded template operations.
Sourcepub const fn anchors(&self) -> &'static [TemplateAnchor]
pub const fn anchors(&self) -> &'static [TemplateAnchor]
Get dynamic slot anchors in document order.
Sourcepub fn static_node(&self, op: usize) -> Option<StaticTemplateNode<'_>>
pub fn static_node(&self, op: usize) -> Option<StaticTemplateNode<'_>>
Return a static node by flat template op.
Sourcepub fn static_element(&self, op: usize) -> Option<StaticTemplateElement<'_>>
pub fn static_element(&self, op: usize) -> Option<StaticTemplateElement<'_>>
Return a static element by flat template op.
Sourcepub fn static_text(&self, op: usize) -> Option<StaticTemplateText<'_>>
pub fn static_text(&self, op: usize) -> Option<StaticTemplateText<'_>>
Return a static text node by flat template op.
Sourcepub fn root_count(&self) -> usize
pub fn root_count(&self) -> usize
Return the number of rendered root children in this template.
Sourcepub fn static_node_at_path(
&self,
path: TemplatePath,
) -> Option<StaticTemplateNode<'_>>
pub fn static_node_at_path( &self, path: TemplatePath, ) -> Option<StaticTemplateNode<'_>>
Return a static node by compact template path.
Trait Implementations§
impl Copy for Template
impl Eq for Template
Source§impl Ord for Template
impl Ord for Template
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnsafeUnpin for Template
impl UnwindSafe for Template
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.