Enum dioxus_core::RenderReturn
source · pub enum RenderReturn {
Ready(VNode),
Aborted(VNode),
}Expand description
The actual state of the component’s most recent computation
Because Dioxus accepts components in the form of async fn() -> 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 currently-available element
Aborted(VNode)
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.
Methods from Deref<Target = VNode>§
sourcepub fn dynamic_root(&self, idx: usize) -> Option<&DynamicNode>
pub fn dynamic_root(&self, idx: usize) -> Option<&DynamicNode>
Load a dynamic root at the given index
Returns None if the root is actually a static node (Element/Text)
sourcepub fn mounted_dynamic_node(
&self,
dynamic_node_idx: usize,
dom: &VirtualDom
) -> Option<ElementId>
pub fn mounted_dynamic_node( &self, dynamic_node_idx: usize, dom: &VirtualDom ) -> Option<ElementId>
Get the mounted id for a dynamic node index
sourcepub fn mounted_root(
&self,
root_idx: usize,
dom: &VirtualDom
) -> Option<ElementId>
pub fn mounted_root( &self, root_idx: usize, dom: &VirtualDom ) -> Option<ElementId>
Get the mounted id for a root node index
sourcepub fn mounted_dynamic_attribute(
&self,
dynamic_attribute_idx: usize,
dom: &VirtualDom
) -> Option<ElementId>
pub fn mounted_dynamic_attribute( &self, dynamic_attribute_idx: usize, dom: &VirtualDom ) -> Option<ElementId>
Get the mounted id for a dynamic attribute index