Enum dioxus_core::nodes::VNode[][src]

pub enum VNode<'src> {
    Element(&'src VElement<'src>),
    Text(VText<'src>),
    Suspended,
    Component(VComponent<'src>),
}

Variants

Element(&'src VElement<'src>)

An element node (node type ELEMENT_NODE).

Text(VText<'src>)

A text node (node type TEXT_NODE).

Note: This wraps a VText instead of a plain String in order to enable custom methods like create_text_node() on the wrapped type.

Suspended

A “suspended component” This is a masqeurade over an underlying future that needs to complete When the future is completed, the VNode will then trigger a render

Component(VComponent<'src>)

A User-defined componen node (node type COMPONENT_NODE)

Implementations

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

pub fn element(
    bump: &'a Bump,
    key: NodeKey,
    tag_name: &'a str,
    listeners: &'a [Listener<'a>],
    attributes: &'a [Attribute<'a>],
    children: &'a [VNode<'a>],
    namespace: Option<&'a str>
) -> VNode<'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.

pub fn text(text: &'a str) -> VNode<'a>[src]

Construct a new text node with the given text.

Trait Implementations

impl<'src> Debug for VNode<'src>[src]

Auto Trait Implementations

impl<'src> !RefUnwindSafe for VNode<'src>

impl<'src> !Send for VNode<'src>

impl<'src> !Sync for VNode<'src>

impl<'src> Unpin for VNode<'src>

impl<'src> !UnwindSafe for VNode<'src>

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> Erased for T[src]

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

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

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.