Struct sauron_core::dom::cmd::Cmd [−][src]
pub struct Cmd<DSP> {
pub commands: Vec<Callback<DSP, ()>>,
pub should_update_view: bool,
pub log_measurements: 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<Callback<DSP, ()>>
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
log_measurements: bool
tell the cmd to log the measurements of not. set only to true for a certain MSG where you want to measure the performance in the component update function. Otherwise, measurement calls for other non-trivial functions are also called causing on measurements.
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.
Create a cmd which instruct the program that there is NO update will be made to the view
batch dispatch this msg on the next update loop
Convert effects into Cmd
Trait Implementations
Auto Trait Implementations
impl<DSP> !RefUnwindSafe for Cmd<DSP>
impl<DSP> !UnwindSafe for Cmd<DSP>
Blanket Implementations
Mutably borrows from an owned value. Read more