pub enum Leaf<MSG> {
Text(Cow<'static, str>),
Symbol(Cow<'static, str>),
Comment(Cow<'static, str>),
DocType(Cow<'static, str>),
NodeList(Vec<Node<MSG>>),
Fragment(Vec<Node<MSG>>),
StatefulComponent(StatefulModel<MSG>),
StatelessComponent(StatelessModel<MSG>),
TemplatedView(TemplatedView<MSG>),
}
Expand description
A leaf node value of html dom tree
Variants§
Text(Cow<'static, str>)
Text variant of a virtual node
Symbol(Cow<'static, str>)
Html entities such as >
Comment(Cow<'static, str>)
A comment node
DocType(Cow<'static, str>)
doctype: html, math, svg https://www.w3.org/QA/2002/04/valid-dtd-list.html
NodeList(Vec<Node<MSG>>)
A node containing nodes, this will be unrolled together with the rest of the children of the node
Fragment(Vec<Node<MSG>>)
A document fragment node, will be created using fragment node and attached to the dom
StatefulComponent(StatefulModel<MSG>)
Stateful Component leaf
StatelessComponent(StatelessModel<MSG>)
Stateless Component leaf
TemplatedView(TemplatedView<MSG>)
a view where a template and skip diff is provided
Implementations§
source§impl<MSG> Leaf<MSG>
impl<MSG> Leaf<MSG>
sourcepub fn attribute_value(
&self,
name: &&'static str
) -> Option<Vec<&AttributeValue<MSG>>>
pub fn attribute_value( &self, name: &&'static str ) -> Option<Vec<&AttributeValue<MSG>>>
return the attribute value of this leaf
sourcepub fn attributes(&self) -> Option<&[Attribute<MSG>]>
pub fn attributes(&self) -> Option<&[Attribute<MSG>]>
attributes, we are returning the attributes of the top level node of this stateless mode view
Trait Implementations§
source§impl<MSG> PartialEq for Leaf<MSG>
impl<MSG> PartialEq for Leaf<MSG>
impl<MSG> Eq for Leaf<MSG>
Auto Trait Implementations§
impl<MSG> Freeze for Leaf<MSG>
impl<MSG> !RefUnwindSafe for Leaf<MSG>
impl<MSG> !Send for Leaf<MSG>
impl<MSG> !Sync for Leaf<MSG>
impl<MSG> Unpin for Leaf<MSG>
impl<MSG> !UnwindSafe for Leaf<MSG>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.