Struct leptos_core::ForProps

source ·
pub struct ForProps<E, T, G, I, K>where
    E: Fn() -> Vec<T>,
    G: Fn(Scope, &T) -> Element,
    I: Fn(&T) -> K,
    K: Eq + Hash,
    T: 'static,
{ pub each: E, pub key: I, pub children: Box<dyn Fn() -> Vec<G>>, }
Expand description

Properties for the For component, a keyed list.

Fields§

§each: E

Items over which the component should iterate.

§key: I

A key function that will be applied to each item

§children: Box<dyn Fn() -> Vec<G>>

Should provide a single child function, which takes

Implementations§

Create a builder for building ForProps. On the builder, call .each(...), .key(...), .children(...) to set the values of the fields. Finally, call .build() to create the instance of ForProps.

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.