Struct sauron_core::dom::cmd::Cmd[][src]

pub struct Cmd<DSP>(pub Vec<Rc<dyn Fn(DSP)>>);
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.

Tuple Fields

0: Vec<Rc<dyn Fn(DSP)>>

Implementations

creates a new Cmd from a function

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

A Cmd with no callback, similar to NoOp.

Executes the Cmd

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 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.