Struct PropertyExpression

Source
pub struct PropertyExpression<T: Default> {
    pub id: usize,
    pub cached_value: T,
    pub transition_manager: TransitionManager<T>,
}

Fields§

§id: usize§cached_value: T§transition_manager: TransitionManager<T>

Implementations§

Source§

impl<T: Default> PropertyExpression<T>

Source

pub fn new(id: usize) -> Self

Trait Implementations§

Source§

impl<T: Default + Clone> PropertyInstance<T> for PropertyExpression<T>

Source§

fn get(&self) -> &T

Source§

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

Source§

fn _get_vtable_id(&self) -> Option<usize>

Source§

fn set(&mut self, value: T)

Source§

fn ease_to(&mut self, new_value: T, duration_frames: u64, curve: EasingCurve)

Immediately start transitioning from current value to the provided new_value, clearing the transition queue before doing so
Source§

fn ease_to_later( &mut self, new_value: T, duration_frames: u64, curve: EasingCurve, )

Add a transition to the transition queue, which will execute after the current queue is complete. The starting value for this new transition will be the final value upon completion of the current transition queue.
Source§

fn _get_transition_manager(&mut self) -> Option<&mut TransitionManager<T>>

Used by engine to gain access to this property’s transition queue

Auto Trait Implementations§

§

impl<T> Freeze for PropertyExpression<T>
where T: Freeze,

§

impl<T> !RefUnwindSafe for PropertyExpression<T>

§

impl<T> !Send for PropertyExpression<T>

§

impl<T> !Sync for PropertyExpression<T>

§

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

§

impl<T> !UnwindSafe for PropertyExpression<T>

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> RoundFrom<T> for T

Source§

fn round_from(x: T) -> T

Performs the conversion.
Source§

impl<T, U> RoundInto<U> for T
where U: RoundFrom<T>,

Source§

fn round_into(self) -> U

Performs the conversion.
Source§

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

Source§

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>,

Source§

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.