Trait dioxus_core::IntoVNode
source · [−]pub trait IntoVNode<'a> {
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a>;
}
Expand description
Trait implementations for use in the rsx! and html! macros.
Details
This section provides convenience methods and trait implementations for converting common structs into a format accepted by the macros.
All dynamic content in the macros must flow in through fragment_from_iter
. Everything else must be statically layed out.
We pipe basically everything through fragment_from_iter
, so we expect a very specific type:
ⓘ
impl IntoIterator<Item = impl IntoVNode<'a>>
As such, all node creation must go through the factory, which is only available in the component context. These strict requirements make it possible to manage lifetimes and state.
Required methods
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a>
fn into_vnode(self, cx: NodeFactory<'a>) -> VNode<'a>
Convert this into a VNode
, using the NodeFactory
as a source of allocation