[][src]Struct sauron_vdom::Element

pub struct Element<T> {
    pub tag: T,
    pub attrs: BTreeMap<String, Value>,
    pub events: BTreeMap<String, Callback<Event>>,
    pub children: Vec<Node<T>>,
    pub namespace: Option<String>,
}

Fields

tag: Tattrs: BTreeMap<String, Value>events: BTreeMap<String, Callback<Event>>children: Vec<Node<T>>namespace: Option<String>

Methods

impl<T> Element<T>[src]

pub fn add_attributes<'a, A>(self, attrs: A) -> Self where
    A: AsRef<[Attribute<'a>]>, 
[src]

pub fn add_attributes_ref<'a, A>(&mut self, attrs: A) -> &mut Self where
    A: AsRef<[Attribute<'a>]>, 
[src]

add the attribute values or events callback into this element

pub fn add_children<C>(self, children: C) -> Self where
    C: AsRef<[Node<T>]>,
    T: Clone
[src]

pub fn add_event_listener(self, event: &str, cb: Callback<Event>) -> Self[src]

impl<T> Element<T>[src]

pub fn new(tag: T) -> Self[src]

Create a Element using the supplied tag name

pub fn namespace(self, namespace: &str) -> Self[src]

set the namespace of this element

Trait Implementations

impl<T: Clone> Clone for Element<T>[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<Element<T>> for Element<T>[src]

impl<T: Default> Default for Element<T>[src]

impl<T> From<Element<T>> for Node<T>[src]

impl<T> Display for Element<T> where
    T: ToString
[src]

impl<T: Debug> Debug for Element<T>[src]

Auto Trait Implementations

impl<T> !Send for Element<T>

impl<T> !Sync for Element<T>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.