Struct sauron::cmd::Cmd [−][src]
pub struct Cmd<DSP> { pub commands: Vec<Rc<dyn Fn(DSP) + 'static>, Global>, pub should_update_view: bool, }
Expand description
Cmd 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. Cmd 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.
Fields
commands: Vec<Rc<dyn Fn(DSP) + 'static>, Global>
the functions that would be executed when this Cmd is emited
should_update_view: bool
this instruct the program whether or not to update the view
Implementations
creates a unified Cmd which batches all the other Cmds in one.
Creates an empty Cmd and specifies that there is NO update will be made to the view.