Struct dioxus_core::prelude::VNode

source ·
pub struct VNode<'a> {
    pub key: Option<&'a str>,
    pub parent: Option<ElementId>,
    pub template: Cell<Template<'static>>,
    pub root_ids: BoxedCellSlice,
    pub dynamic_nodes: &'a [DynamicNode<'a>],
    pub dynamic_attrs: &'a [Attribute<'a>],
}
Expand description

A reference to a template along with any context needed to hydrate it

The dynamic parts of the template are stored separately from the static parts. This allows faster diffing by skipping static parts of the template.

Fields§

§key: Option<&'a str>

The key given to the root of this template.

In fragments, this is the key of the first child. In other cases, it is the key of the root.

§parent: Option<ElementId>

When rendered, this template will be linked to its parent manually

§template: Cell<Template<'static>>

The static nodes and static descriptor of the template

§root_ids: BoxedCellSlice

The IDs for the roots of this template - to be used when moving the template around and removing it from the actual Dom

§dynamic_nodes: &'a [DynamicNode<'a>]

The dynamic parts of the template

§dynamic_attrs: &'a [Attribute<'a>]

The dynamic parts of the template

Implementations§

Create a template with no nodes that will be skipped over during diffing

Load a dynamic root at the given index

Returns None if the root is actually a static node (Element/Text)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Consume this item along with a scopestate and produce a DynamicNode Read more
Consume this item along with a scopestate and produce a DynamicNode Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.