Struct rmididings::proc::SceneSwitch[][src]

pub struct SceneSwitch(pub SceneNum);
Expand description

Switches to a specific scene.

The argument is: scene_number.

This event consumes all other events, so after this filter only the curent scene switch remains.

Note that the scene is only switched when there are events, so that when an event filter discards all events, the scene switch is not done. It also means that you need to generate an event when putting this in a pre, init, exit or post patch.

Examples

let generator = SceneSwitch(5);

let mut evs = EventStream::none();
generator.run(&mut evs);
assert_eq!(evs, SceneSwitchEvent(5));

Trait Implementations

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.