pub struct PropertyLiteral<T> { /* private fields */ }
Expand description

The Literal form of a Property: a bare literal value with support for easing/interpolation

Implementations§

source§

impl<T: Clone> PropertyLiteral<T>

source

pub fn new(value: T) -> Self

Trait Implementations§

source§

impl<T> Into<Box<dyn PropertyInstance<T>>> for PropertyLiteral<T>
where T: Default + Clone + 'static,

source§

fn into(self) -> Box<dyn PropertyInstance<T>>

Converts this type into the (usually inferred) input type.
source§

impl<T: Default + Clone> PropertyInstance<T> for PropertyLiteral<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> !RefUnwindSafe for PropertyLiteral<T>

§

impl<T> !Send for PropertyLiteral<T>

§

impl<T> !Sync for PropertyLiteral<T>

§

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

§

impl<T> !UnwindSafe for PropertyLiteral<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, 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.