Enum dioxus_core::RenderReturn
source · pub enum RenderReturn<'a> {
Ready(VNode<'a>),
Aborted(VPlaceholder),
Pending(BumpBox<'a, dyn Future<Output = Element<'a>> + 'a>),
}
Expand description
The actual state of the component’s most recent computation
Because Dioxus accepts components in the form of async fn(Scope) -> Result<VNode>
, we need to support both
sync and async versions.
Dioxus will do its best to immediately resolve any async components into a regular Element, but as an implementor you might need to handle the case where there’s no node immediately ready.
Variants§
Ready(VNode<'a>)
A currently-available element
Aborted(VPlaceholder)
The component aborted rendering early. It might’ve thrown an error.
In its place we’ve produced a placeholder to locate its spot in the dom when it recovers.
Pending(BumpBox<'a, dyn Future<Output = Element<'a>> + 'a>)
An ongoing future that will resolve to a Element