pub enum MusicCommand {
Load {
cue: String,
},
#[non_exhaustive] Start {
cue: String,
gain: f32,
},
Gain {
cue: String,
gain: f32,
},
Stop {
cue: String,
},
}Expand description
What the platform must do to the music this frame. A track is loaded, started, has its volume changed and is stopped, which also unloads it.
Variants§
Load
Start loading cue’s file; it will be started soon.
#[non_exhaustive]Start
Play cue (loaded earlier) from the start at gain, looped if the
manifest says so. If it isn’t loaded yet, play it once it is. Build
it with MusicCommand::start (ADR-0039).
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Gain
Set cue’s gain (0–1, a multiplier on its manifest volume).
Stop
Stop cue and free it (also cancels a load).
Implementations§
Trait Implementations§
Source§impl Clone for MusicCommand
impl Clone for MusicCommand
Source§fn clone(&self) -> MusicCommand
fn clone(&self) -> MusicCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MusicCommand
impl Debug for MusicCommand
Source§impl PartialEq for MusicCommand
impl PartialEq for MusicCommand
Source§impl Serialize for MusicCommand
impl Serialize for MusicCommand
impl StructuralPartialEq for MusicCommand
Auto Trait Implementations§
impl Freeze for MusicCommand
impl RefUnwindSafe for MusicCommand
impl Send for MusicCommand
impl Sync for MusicCommand
impl Unpin for MusicCommand
impl UnsafeUnpin for MusicCommand
impl UnwindSafe for MusicCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more