pub enum AnimationEvent<'a> {
    Start {
        track_entry: TrackEntry,
    },
    Interrupt {
        track_entry: TrackEntry,
    },
    End {
        track_entry: TrackEntry,
    },
    Complete {
        track_entry: TrackEntry,
    },
    Dispose {
        track_entry: TrackEntry,
    },
    Event {
        track_entry: TrackEntry,
        name: &'a str,
        time: f32,
        int: i32,
        float: f32,
        string: &'a str,
        audio_path: &'a str,
        volume: f32,
        balance: f32,
        event: Event,
    },
}
Expand description

A wrapper for Event that makes events slightly nicer to work with in Rust.

To receive events, see AnimationState::set_listener.

Variants§

§

Start

Fields

§track_entry: TrackEntry

The track this event originated from.

§

Interrupt

Fields

§track_entry: TrackEntry

The track this event originated from.

§

End

Fields

§track_entry: TrackEntry

The track this event originated from.

§

Complete

Fields

§track_entry: TrackEntry

The track this event originated from.

§

Dispose

Fields

§track_entry: TrackEntry

The track this event originated from.

§

Event

Fields

§track_entry: TrackEntry

The track this event originated from.

§name: &'a str

The name of the event, which is unique across all events in the skeleton.

§time: f32

The animation time this event was keyed.

§int: i32

The event’s int value.

§float: f32

The event’s float value.

§string: &'a str

The event’s string value or an empty string.

§audio_path: &'a str

The event’s audio path or an empty string.

§volume: f32

The event’s audio volume.

§balance: f32

The event’s audio balance.

§event: Event

The raw event data.

Auto Trait Implementations§

§

impl<'a> Freeze for AnimationEvent<'a>

§

impl<'a> RefUnwindSafe for AnimationEvent<'a>

§

impl<'a> Send for AnimationEvent<'a>

§

impl<'a> Sync for AnimationEvent<'a>

§

impl<'a> Unpin for AnimationEvent<'a>

§

impl<'a> UnwindSafe for AnimationEvent<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.