Struct timeline_rs::Track

source ·
pub struct Track<T>{
    pub keyframes: Vec<Keyframe<T>>,
}

Fields§

§keyframes: Vec<Keyframe<T>>

Trait Implementations§

source§

impl<T> Debug for Track<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> Default for Track<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<Track<(f32, f32)>> for TrackVariant

source§

fn from(track: Track<(f32, f32)>) -> Self

Converts to this type from the input type.
source§

impl From<Track<(f32, f32, f32)>> for TrackVariant

source§

fn from(track: Track<(f32, f32, f32)>) -> Self

Converts to this type from the input type.
source§

impl From<Track<(f32, f32, f32, f32)>> for TrackVariant

source§

fn from(track: Track<(f32, f32, f32, f32)>) -> Self

Converts to this type from the input type.
source§

impl From<Track<bool>> for TrackVariant

source§

fn from(track: Track<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Track<f32>> for TrackVariant

source§

fn from(track: Track<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Track<f64>> for TrackVariant

source§

fn from(track: Track<f64>) -> Self

Converts to this type from the input type.
source§

impl From<Track<i32>> for TrackVariant

source§

fn from(track: Track<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Track<i64>> for TrackVariant

source§

fn from(track: Track<i64>) -> Self

Converts to this type from the input type.
source§

impl JsonTrackLoader<f32> for Track<f32>

source§

impl JsonTrackLoader<f64> for Track<f64>

source§

impl JsonTrackLoader<i32> for Track<i32>

source§

impl JsonTrackLoader<i64> for Track<i64>

source§

impl TimelineTrackImpl<(f32, f32)> for Track<(f32, f32)>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: (f32, f32), next_value: (f32, f32), duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> (f32, f32)

source§

fn get_keyframes(&self) -> &Vec<Keyframe<(f32, f32)>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<(f32, f32)>>

source§

impl TimelineTrackImpl<(f32, f32, f32)> for Track<(f32, f32, f32)>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: (f32, f32, f32), next_value: (f32, f32, f32), duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> (f32, f32, f32)

source§

fn get_keyframes(&self) -> &Vec<Keyframe<(f32, f32, f32)>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<(f32, f32, f32)>>

source§

impl TimelineTrackImpl<(f32, f32, f32, f32)> for Track<(f32, f32, f32, f32)>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: (f32, f32, f32, f32), next_value: (f32, f32, f32, f32), duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> (f32, f32, f32, f32)

source§

fn get_keyframes(&self) -> &Vec<Keyframe<(f32, f32, f32, f32)>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<(f32, f32, f32, f32)>>

source§

impl TimelineTrackImpl<bool> for Track<bool>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: bool, next_value: bool, duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> bool

source§

fn get_keyframes(&self) -> &Vec<Keyframe<bool>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<bool>>

source§

impl TimelineTrackImpl<f32> for Track<f32>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: f32, next_value: f32, duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> f32

source§

fn get_keyframes(&self) -> &Vec<Keyframe<f32>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<f32>>

source§

impl TimelineTrackImpl<f64> for Track<f64>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: f64, next_value: f64, duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> f64

source§

fn get_keyframes(&self) -> &Vec<Keyframe<f64>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<f64>>

source§

impl TimelineTrackImpl<i32> for Track<i32>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: i32, next_value: i32, duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> i32

source§

fn get_keyframes(&self) -> &Vec<Keyframe<i32>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<i32>>

source§

impl TimelineTrackImpl<i64> for Track<i64>

source§

fn get_easing_value_wrap( &self, time: f32, start_value: i64, next_value: i64, duration: f32, easing_function: EasingFunction, easing_type: EasingType ) -> i64

source§

fn get_keyframes(&self) -> &Vec<Keyframe<i64>>

source§

fn get_keyframes_mut(&mut self) -> &mut Vec<Keyframe<i64>>

source§

impl<T> XMLTrackLoader<T> for Track<T>
where TrackVariant: From<Track<T>>, T: Copy + DeserializeOwned + JsonLoaderWrapper<T>,

source§

fn load_xml(xml_path: &str) -> Result<Track<T>>

source§

fn load_xml_str(xml: &str) -> Result<Track<T>>

Auto Trait Implementations§

§

impl<T> Freeze for Track<T>

§

impl<T> RefUnwindSafe for Track<T>
where T: RefUnwindSafe,

§

impl<T> Send for Track<T>
where T: Send,

§

impl<T> Sync for Track<T>
where T: Sync,

§

impl<T> Unpin for Track<T>
where T: Unpin,

§

impl<T> UnwindSafe for Track<T>
where T: UnwindSafe,

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<U, T> TimelineTrack<T> for U
where U: TimelineTrackImpl<T>, T: Copy,

source§

fn add_keyframe(&mut self, keyframe: Keyframe<T>) -> &mut U

source§

fn add_keyframes(&mut self, keyframes: Vec<Keyframe<T>>) -> &mut U

source§

fn sort_keyframes(&mut self) -> &mut U

source§

fn get_keyframe(&self, index: usize) -> Option<&Keyframe<T>>

source§

fn get_keyframe_mut(&mut self, index: usize) -> Option<&mut Keyframe<T>>

source§

fn get_duration(&self) -> Duration

source§

fn get_value(&self, time: Duration) -> T

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.