Struct relm4::RelmMsgHandler 
source · pub struct RelmMsgHandler<Data, ParentModel>where
    Data: MessageHandler<ParentModel> + 'static,
    ParentModel: Model,{ /* private fields */ }Expand description
RelmMsgHandlers are usually used to run expansive tasks on different threads and report back when they are finished
so that their parent components can keep handling UI events in the meantime.
For example you could use a RelmMsgHandler for sending a HTTP request or for copying files.
Multiple RelmMsgHandlers that have the same parent are usually bundled along with RelmComponents
and RelmWorkers in a struct that implements Components.
Implementations§
source§impl<Data, ParentModel> RelmMsgHandler<Data, ParentModel>where
    Data: MessageHandler<ParentModel> + 'static,
    ParentModel: Model,
 
impl<Data, ParentModel> RelmMsgHandler<Data, ParentModel>where Data: MessageHandler<ParentModel> + 'static, ParentModel: Model,
sourcepub fn new(
    parent_model: &ParentModel,
    parent_sender: Sender<ParentModel::Msg>
) -> Self
 
pub fn new( parent_model: &ParentModel, parent_sender: Sender<ParentModel::Msg> ) -> Self
Create a new RelmMsgHandler.
Trait Implementations§
source§impl<Data, ParentModel> Clone for RelmMsgHandler<Data, ParentModel>where
    Data: MessageHandler<ParentModel> + 'static + Clone,
    ParentModel: Model + Clone,
 
impl<Data, ParentModel> Clone for RelmMsgHandler<Data, ParentModel>where Data: MessageHandler<ParentModel> + 'static + Clone, ParentModel: Model + Clone,
source§fn clone(&self) -> RelmMsgHandler<Data, ParentModel>
 
fn clone(&self) -> RelmMsgHandler<Data, ParentModel>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read more