Struct sauron::cmd::Cmd[][src]

pub struct Cmd<DSP> {
    pub commands: Vec<Callback<DSP, ()>, Global>,
    // some fields omitted
}
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, ()>, Global>

the functions that would be executed when this Cmd is emited

Implementations

creates a new Cmd from a function

creates a unified Cmd which batches all the other Cmds in one.

Append more cmd into this cmd and return self

A Cmd with no callback, similar to NoOp.

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 Cmd such that it will not do an update on the view when it is executed

Modify the Cmd 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.

Executes the Cmd

batch dispatch this msg on the next update loop

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Convert Effects that has only follow ups

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.