Struct sauron_core::dom::cmd::Cmd [−][src]
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<Box<dyn FnOnce(DSP)>>
the functions that would be executed when this Cmd is emited
Implementations
When you need the runtime to perform couple of commands, you can batch then together.
Append more cmd into this cmd and return self
Modify the Cmd such that whether or not it will update the view set by should_update_view
when the cmd is executed in the program
Modify the command such that it will not do an update on the view when it is executed.
Modify the command such that it will log measurement when it is executed
Modify the Cmd such that it will log a measuregment when it is executed
The measurement_name
is set to distinguish the measurements from each other.