pub type BoxedTweenable = Box<dyn Tweenable + 'static>;Expand description
The dynamic tweenable type.
When creating lists of tweenables, you will need to box them to create a homogeneous array like so:
Sequence::new([Box::new(delay) as BoxedTweenable, tween.into()]);When using your own Tweenable types, APIs will be easier to use if you
implement From:
Sequence::new([Box::new(MyTweenable) as BoxedTweenable]);
// OR
Sequence::new([MyTweenable]);
impl From<MyTweenable> for BoxedTweenable {
fn from(t: MyTweenable) -> Self {
Box::new(t)
}
}Aliased Type§
pub struct BoxedTweenable(/* private fields */);Trait Implementations§
Source§impl From<Delay> for BoxedTweenable
impl From<Delay> for BoxedTweenable
Source§impl From<Sequence> for BoxedTweenable
impl From<Sequence> for BoxedTweenable
Source§impl From<Tween> for BoxedTweenable
impl From<Tween> for BoxedTweenable
Source§impl IntoBoxedTweenable for BoxedTweenable
impl IntoBoxedTweenable for BoxedTweenable
Source§fn into_boxed(self) -> BoxedTweenable
fn into_boxed(self) -> BoxedTweenable
Convert to a
BoxedTweenable.