ViewBuilder

Trait ViewBuilder 

Source
pub trait ViewBuilder: 'static {
    type Output: View;

    // Required method
    fn build(&self) -> Self::Output;
}
Expand description

A trait for types that can repeatedly construct views.

This is a convenience trait that provides similar functionality to Fn() -> impl View, allowing types to be used as view factories.

Required Associated Types§

Source

type Output: View

The type of view produced by this builder.

Required Methods§

Source

fn build(&self) -> Self::Output

Builds a view

Implementors§

Source§

impl<V: View, F> ViewBuilder for F
where F: 'static + Fn() -> V,