pub struct NodeFactory<'a> { /* private fields */ }
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

Create a new NodeFactory from a Scope or ScopeState

Get the custom alloactor for this component

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

Create a new [VNode::VElement]

Create a new [VNode::VElement] without the trait bound

IE pass in “div” instead of div

Create a new Attribute

Create a new [VNode::VComponent]

Create a new Listener

Create a new [VNode::VFragment] from a root of the rsx! call

Create a new [VNode::VFragment] from any iterator

Create a new VNode from any iterator of children

Create a new EventHandler from an FnMut

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.