[−][src]Struct sauron_vdom::Element
Fields
tag: T
attrs: Vec<Attribute<ATT, EVENT, MSG>>
children: Vec<Node<T, ATT, EVENT, MSG>>
namespace: Option<&'static str>
Methods
impl<T, ATT, EVENT, MSG> Element<T, ATT, EVENT, MSG> where
EVENT: 'static,
MSG: 'static,
ATT: PartialEq + Ord + ToString + Clone,
[src]
EVENT: 'static,
MSG: 'static,
ATT: PartialEq + Ord + ToString + Clone,
pub fn with_tag(tag: T) -> Self
[src]
pub fn events(&self) -> Vec<&Attribute<ATT, EVENT, MSG>>
[src]
get the attributes that are events
pub fn get_event(&self, name: &ATT) -> Option<&Attribute<ATT, EVENT, MSG>>
[src]
pub fn attributes(&self) -> Vec<Attribute<ATT, EVENT, MSG>>
[src]
pub fn get_attr_value(&self, key: &ATT) -> Option<Value>
[src]
get all the attributes with the same name and merge their value
pub fn add_attributes(&mut self, attrs: Vec<Attribute<ATT, EVENT, MSG>>)
[src]
pub fn add_children(&mut self, children: Vec<Node<T, ATT, EVENT, MSG>>)
[src]
pub fn add_event_listener(&mut self, event: ATT, cb: Callback<EVENT, MSG>)
[src]
pub fn is_children_a_node_text(&self) -> bool
[src]
check if the children of this node is only 1 and it is a text node
Trait Implementations
impl<T: Clone, ATT: Clone, EVENT: Clone, MSG: Clone> Clone for Element<T, ATT, EVENT, MSG> where
MSG: 'static,
EVENT: 'static,
ATT: Clone,
[src]
MSG: 'static,
EVENT: 'static,
ATT: Clone,
fn clone(&self) -> Element<T, ATT, EVENT, MSG>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Debug, ATT: Debug, EVENT: Debug, MSG: Debug> Debug for Element<T, ATT, EVENT, MSG> where
MSG: 'static,
EVENT: 'static,
ATT: Clone,
[src]
MSG: 'static,
EVENT: 'static,
ATT: Clone,
impl<T: Default, ATT: Default, EVENT: Default, MSG: Default> Default for Element<T, ATT, EVENT, MSG> where
MSG: 'static,
EVENT: 'static,
ATT: Clone,
[src]
MSG: 'static,
EVENT: 'static,
ATT: Clone,
impl<T, ATT, EVENT, MSG> From<Element<T, ATT, EVENT, MSG>> for Node<T, ATT, EVENT, MSG> where
ATT: Clone,
[src]
ATT: Clone,
impl<T: PartialEq, ATT: PartialEq, EVENT: PartialEq, MSG: PartialEq> PartialEq<Element<T, ATT, EVENT, MSG>> for Element<T, ATT, EVENT, MSG> where
MSG: 'static,
EVENT: 'static,
ATT: Clone,
[src]
MSG: 'static,
EVENT: 'static,
ATT: Clone,
fn eq(&self, other: &Element<T, ATT, EVENT, MSG>) -> bool
[src]
fn ne(&self, other: &Element<T, ATT, EVENT, MSG>) -> bool
[src]
impl<T, ATT, EVENT, MSG> StructuralPartialEq for Element<T, ATT, EVENT, MSG> where
MSG: 'static,
EVENT: 'static,
ATT: Clone,
[src]
MSG: 'static,
EVENT: 'static,
ATT: Clone,
Auto Trait Implementations
impl<T, ATT, EVENT, MSG> !RefUnwindSafe for Element<T, ATT, EVENT, MSG>
impl<T, ATT, EVENT, MSG> !Send for Element<T, ATT, EVENT, MSG>
impl<T, ATT, EVENT, MSG> !Sync for Element<T, ATT, EVENT, MSG>
impl<T, ATT, EVENT, MSG> Unpin for Element<T, ATT, EVENT, MSG> where
ATT: Unpin,
T: Unpin,
ATT: Unpin,
T: Unpin,
impl<T, ATT, EVENT, MSG> !UnwindSafe for Element<T, ATT, EVENT, MSG>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,