[−][src]Enum sauron_vdom::Node
This is the core data structure of the library.
Any tree can be represented by Node
.
The T
is generic instead of just using plain &'static str
in order for this library to be used not only in html based widget
but can also be used to represent native GUI widgets
in various platforms.
Variants
Element(Element<T, CB>)
Text(Text)
Methods
impl<T, CB> Node<T, CB> where
T: Clone,
CB: Clone,
[src]
T: Clone,
CB: Clone,
pub fn as_element(&mut self) -> Option<&mut Element<T, CB>>
[src]
pub fn as_element_ref(&mut self) -> Option<&Element<T, CB>>
[src]
pub fn children<C>(self, children: C) -> Self where
C: AsRef<[Node<T, CB>]>,
CB: Clone,
[src]
C: AsRef<[Node<T, CB>]>,
CB: Clone,
Append children to this element
pub fn attributes<'a, A>(self, attributes: A) -> Self where
A: AsRef<[Attribute<'a, CB>]>,
[src]
A: AsRef<[Attribute<'a, CB>]>,
add attributes to the node
Trait Implementations
impl<T: PartialEq, CB: PartialEq> PartialEq<Node<T, CB>> for Node<T, CB>
[src]
impl<T, CB> From<Element<T, CB>> for Node<T, CB>
[src]
impl<T: Clone, CB: Clone> Clone for Node<T, CB>
[src]
fn clone(&self) -> Node<T, CB>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T, CB> Display for Node<T, CB> where
T: ToString,
[src]
T: ToString,
impl<T: Debug, CB: Debug> Debug for Node<T, CB>
[src]
Auto Trait Implementations
impl<T, CB> Send for Node<T, CB> where
CB: Send,
T: Send,
CB: Send,
T: Send,
impl<T, CB> Sync for Node<T, CB> where
CB: Sync,
T: Sync,
CB: Sync,
T: Sync,
Blanket Implementations
impl<T, U> Into 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> From for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,