[−][src]Struct dodrio::Node
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]
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>
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>
.
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]
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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
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?
fn into_iter(self) -> I
[src]
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>,