[−][src]Struct sauron_vdom::Element
Fields
tag: T
attrs: 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]
A: AsRef<[Attribute<'a>]>,
pub fn add_attributes_ref<'a, A>(&mut self, attrs: A) -> &mut Self where
A: AsRef<[Attribute<'a>]>,
[src]
A: AsRef<[Attribute<'a>]>,
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]
C: AsRef<[Node<T>]>,
T: Clone,
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]
fn clone(&self) -> 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]
T: ToString,
impl<T: Debug> Debug for Element<T>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,