Enum songbird::tracks::TrackCommand[][src]

#[non_exhaustive]pub enum TrackCommand {
    Play,
    Pause,
    Stop,
    Volume(f32),
    Seek(Duration),
    AddEvent(EventData),
    Do(Box<dyn FnOnce(&mut Track) + Send + Sync + 'static>),
    Request(Sender<Box<TrackState>>),
    Loop(LoopState),
    MakePlayable,
}

A request from external code using a TrackHandle to modify or act upon an Track object.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Play

Set the track’s play_mode to play/resume.

Pause

Set the track’s play_mode to pause.

Stop

Stop the target track. This cannot be undone.

Volume(f32)

Set the track’s volume.

Seek(Duration)

Seek to the given duration.

On unsupported input types, this can be fatal.

AddEvent(EventData)

Register an event on this track.

Do(Box<dyn FnOnce(&mut Track) + Send + Sync + 'static>)

Run some closure on this track, with direct access to the core object.

Request(Sender<Box<TrackState>>)

Request a read-only view of this track’s state.

Loop(LoopState)

Change the loop count/strategy of this track.

MakePlayable

Prompts a track’s input to become live and usable, if it is not already.

Trait Implementations

impl Debug for TrackCommand[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]