pub struct Dispatch<APP>where
APP: Application,{ /* private fields */ }
Expand description
Dispatch is a command to be executed by the system. This is returned at the init function of a component and is executed right after instantiation of that component. Dispatch required a DSP object which is the Program as an argument The emit function is called with the program argument. The callback is supplied with the program an is then executed/emitted.
Implementations§
source§impl<APP> Dispatch<APP>where
APP: Application,
impl<APP> Dispatch<APP>where
APP: Application,
sourcepub fn batch(cmds: impl IntoIterator<Item = Dispatch<APP>>) -> Dispatch<APP>
pub fn batch(cmds: impl IntoIterator<Item = Dispatch<APP>>) -> Dispatch<APP>
When you need the runtime to perform couple of commands, you can batch then together.
sourcepub fn append(&mut self, cmds: impl IntoIterator<Item = Dispatch<APP>>)
pub fn append(&mut self, cmds: impl IntoIterator<Item = Dispatch<APP>>)
Append more cmd into this cmd and return self
sourcepub fn batch_msg(
msg_list: impl IntoIterator<Item = <APP as Application>::MSG>
) -> Dispatch<APP>
pub fn batch_msg( msg_list: impl IntoIterator<Item = <APP as Application>::MSG> ) -> Dispatch<APP>
Tell the runtime to execute subsequent update of the App with the message list. A single call to update the view is then executed thereafter.
Trait Implementations§
source§impl<APP> From<Cmd<<APP as Application>::MSG>> for Dispatch<APP>where
APP: Application,
impl<APP> From<Cmd<<APP as Application>::MSG>> for Dispatch<APP>where
APP: Application,
source§impl<APP> From<Effects<<APP as Application>::MSG, ()>> for Dispatch<APP>where
APP: Application,
impl<APP> From<Effects<<APP as Application>::MSG, ()>> for Dispatch<APP>where
APP: Application,
Auto Trait Implementations§
impl<APP> Freeze for Dispatch<APP>
impl<APP> !RefUnwindSafe for Dispatch<APP>
impl<APP> !Send for Dispatch<APP>
impl<APP> !Sync for Dispatch<APP>
impl<APP> Unpin for Dispatch<APP>
impl<APP> !UnwindSafe for Dispatch<APP>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more