pub struct VNode<'a> {
pub key: Option<&'a str>,
pub parent: Option<ElementId>,
pub template: Cell<Template<'static>>,
pub root_ids: RefCell<Vec<ElementId, Global>>,
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: RefCell<Vec<ElementId, Global>>
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§
Trait Implementations§
§impl<'a> IntoDynNode<'a, ()> for &'a VNode<'a>
impl<'a> IntoDynNode<'a, ()> for &'a VNode<'a>
§fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>
fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>
Consume this item along with a scopestate and produce a DynamicNode Read more
§impl<'a> IntoDynNode<'a, ()> for VNode<'a>
impl<'a> IntoDynNode<'a, ()> for VNode<'a>
§fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>
fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>
Consume this item along with a scopestate and produce a DynamicNode Read more
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for VNode<'a>
impl<'a> !Send for VNode<'a>
impl<'a> !Sync for VNode<'a>
impl<'a> Unpin for VNode<'a>
impl<'a> !UnwindSafe for VNode<'a>
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