Type Alias dioxus_core::Element

source ·
pub type Element<'a> = Option<VNode<'a>>;
Expand description

An Element is a possibly-none VNode created by calling render on Scope or ScopeState.

An Errored Element will propagate the error to the nearest error boundary.

Aliased Type§

enum Element<'a> {
    None,
    Some(VNode<'a>),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(VNode<'a>)

Some value of type T.

Trait Implementations§

source§

impl<'a, T: IntoAttributeValue<'a>> IntoAttributeValue<'a> for Option<T>

source§

fn into_value(self, bump: &'a Bump) -> AttributeValue<'a>

Convert into an attribute value
source§

impl<'a> IntoDynNode<'a, ()> for &Element<'a>

source§

fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>

Consume this item along with a scopestate and produce a DynamicNode Read more
source§

impl<'a, T: IntoDynNode<'a>> IntoDynNode<'a, ()> for Option<T>

source§

fn into_vnode(self, _cx: &'a ScopeState) -> DynamicNode<'a>

Consume this item along with a scopestate and produce a DynamicNode Read more
source§

impl<T> Throw<()> for Option<T>

Or just throw errors we know about

§

type Out = T

The value that will be returned in if the given value is Ok.
source§

fn throw(self, cx: &ScopeState) -> Option<T>

Returns an option that evaluates to None if there is an error, injecting the error to the nearest error boundary. Read more
source§

fn throw_with<D: Debug + 'static>( self, cx: &ScopeState, error: impl FnOnce() -> D ) -> Option<Self::Out>

Returns an option that evaluates to None if there is an error, injecting the error to the nearest error boundary. Read more