[][src]Struct dodrio::Node

pub struct Node<'a> { /* fields omitted */ }

A virtual DOM node.

Implementations

impl<'a> Node<'a>[src]

pub fn element(
    bump: &'a Bump,
    key: NodeKey,
    tag_name: &'a str,
    listeners: &'a [Listener<'a>],
    attributes: &'a [Attribute<'a>],
    children: &'a [Node<'a>],
    namespace: Option<&'a str>
) -> Node<'a>
[src]

Low-level constructor for making a new Node of type element with given parts.

This is primarily intended for JSX and templating proc-macros to compile down into. If you are building nodes by-hand, prefer using the dodrio::builder::* APIs.

Trait Implementations

impl<'a> Clone for Node<'a>[src]

impl<'a> Debug for Node<'a>[src]

impl<'a> IntoIterator for Node<'a>[src]

A node can become an iterator that yields the node itself once.

This implementation of IntoIterator mostly exists to improve the typed-html ergonomics, where the macro invokes .into_iter() on the child contents of a tag. By implementing IntoIterator here, we avoid having to do nasty shenanigans like <p>vec![$contents]</p> instead of plain old <p>$contents</p>.

type Item = Node<'a>

The type of the elements being iterated over.

type IntoIter = Once<Self::Item>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Node<'a>

impl<'a> !Send for Node<'a>

impl<'a> !Sync for Node<'a>

impl<'a> Unpin for Node<'a>

impl<'a> !UnwindSafe for Node<'a>

Blanket Implementations

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

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

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

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.