Struct dioxus::prelude::NodeFactory [−][src]
pub struct NodeFactory<'a> { /* fields omitted */ }
Expand description
This struct provides an ergonomic API to quickly build VNodes.
NodeFactory is used to build VNodes in the component’s memory space. This struct adds metadata to the final VNode about listeners, attributes, and children
Implementations
Directly pass in text blocks without the need to use the format_args macro.
Parses a lazy text Arguments and returns a string and a flag indicating if the text is ’static
Text that’s static may be pointer compared, making it cheaper to diff
Create some text that’s allocated along with the other vnodes
pub fn element(
&self,
el: impl DioxusElement,
listeners: &'a [Listener<'a>],
attributes: &'a [Attribute<'a>],
children: &'a [VNode<'a>],
key: Option<Arguments<'_>>
) -> VNode<'a>
pub fn raw_element(
&self,
tag_name: &'static str,
namespace: Option<&'static str>,
listeners: &'a [Listener<'a>],
attributes: &'a [Attribute<'a>],
children: &'a [VNode<'a>],
key: Option<Arguments<'_>>
) -> VNode<'a>
pub fn attr(
&self,
name: &'static str,
val: Arguments<'_>,
namespace: Option<&'static str>,
is_volatile: bool
) -> Attribute<'a>
pub fn component<P>(
&self,
component: fn(Scope<'a, P>) -> Option<VNode<'a>>,
props: P,
key: Option<Arguments<'_>>
) -> VNode<'a> where
P: 'a + Properties,
pub fn fragment_root<'b, 'c>(
self,
node_iter: impl IntoIterator<Item = impl IntoVNode<'a> + 'c> + 'b
) -> VNode<'a>
pub fn fragment_from_iter<'b, 'c>(
self,
node_iter: impl IntoIterator<Item = impl IntoVNode<'a> + 'c> + 'b
) -> VNode<'a>
pub fn create_children(
self,
node_iter: impl IntoIterator<Item = impl IntoVNode<'a>>
) -> Option<VNode<'a>>
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for NodeFactory<'a>
impl<'a> !Send for NodeFactory<'a>
impl<'a> !Sync for NodeFactory<'a>
impl<'a> Unpin for NodeFactory<'a>
impl<'a> !UnwindSafe for NodeFactory<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more