Trait relm4::factory::Factory

source ·
pub trait Factory<Data, View>where
    Data: FactoryPrototype<View = View>,
    View: FactoryView<Data::Root>,{
    type Key: ?Sized;

    // Required method
    fn generate(&self, view: &View, sender: Sender<Data::Msg>);
}
Expand description

A container that is a able to efficiently update, generate and remove widgets that represent the data stored in the container.

Required Associated Types§

source

type Key: ?Sized

Key that provides additional information for the FactoryPrototype functions.

Required Methods§

source

fn generate(&self, view: &View, sender: Sender<Data::Msg>)

Efficiently update the view according to data changes.

Implementors§

source§

impl<Data, View> Factory<Data, View> for FactoryVec<Data>where Data: FactoryPrototype<Factory = Self, View = View>, View: FactoryView<Data::Root>,

§

type Key = usize

source§

impl<Data, View> Factory<Data, View> for FactoryVecDeque<Data>where Data: FactoryPrototype<Factory = Self, View = View>, View: FactoryView<Data::Root> + FactoryListView<Data::Root>, <Data as FactoryPrototype>::Root: Clone,