Struct seed::dom_types::El

source ·
pub struct El<Ms: Clone + 'static> {
    pub tag: Tag,
    pub attrs: Attrs,
    pub style: Style,
    pub text: Option<String>,
    pub children: Vec<El<Ms>>,
    pub id: Option<u32>,
    pub nest_level: Option<u32>,
    pub el_ws: Option<Element>,
    pub key: Option<u32>,
    pub listeners: Vec<Listener<Ms>>,
}
Expand description

An component in our virtual DOM.

Fields

tag: Tagattrs: Attrsstyle: Styletext: Option<String>children: Vec<El<Ms>>id: Option<u32>nest_level: Option<u32>el_ws: Option<Element>key: Option<u32>listeners: Vec<Listener<Ms>>

Implementations

This is used to provide access to el_ws while recursively appending children to it.

Dummy elements are used when logic must return an El due to the type system, but we don’t want to render anything.

Trait Implementations

Allow the user to clone their Els. Note that there’s no easy way to clone the closures within listeners, so we ommit it.

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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.