pub struct LazyNodes<'a, 'b> { /* private fields */ }
Expand description

A concrete type provider for closures that build VNode structures.

This struct wraps lazy structs that build VNode trees Normally, we cannot perform a blanket implementation over closures, but if we wrap the closure in a concrete type, we can maintain separate implementations of IntoVNode.

LazyNodes::new(|f| f.element("div", [], [], [] None))

Implementations

Create a new LazyNodes closure, optimistically placing it onto the stack.

If the closure cannot fit into the stack allocation (16 bytes), then it is placed on the heap. Most closures will fit into the stack, and is the most optimal way to use the creation function.

Create a new LazyNodes closure, but force it onto the heap.

Call the closure with the given factory to produce real VNodes.

let f = LazyNodes::new(move |f| f.element("div", [], [], [] None));

let fac = NodeFactory::new(&cx);

let node = f.call(cac);

Trait Implementations

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Convert this into a VNode, using the NodeFactory as a source of allocation

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 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.