pub struct AnimSpec {
pub keyframes: Vec<Keyframe>,
pub enter: Option<Enter>,
pub exit: Option<Enter>,
}Expand description
Per-node animation declarations. Boxed on NodeSpec: enter and
exit are 60 bytes each and almost every node has neither.
Fields§
§keyframes: Vec<Keyframe>CSS-style stops for the animatable slots (see crate::keyframes):
with a transition, the slots a stop names cycle through the stops
over the transition’s duration, in its repeat direction, offset by
its delay_ms — forever, and without the view redrawing. Slots no
stop names still tween toward what the view declares. Empty = none.
enter: Option<Enter>Where this node’s slots start the first frame it is seen (see
crate::enter): with a transition, the slots it names ease in
from there instead of snapping — dx/dy slide the node in from
that far away, bg fades it in. A node that vanishes and returns
enters again. None = first sight snaps.
exit: Option<Enter>Where this node’s slots end the frame after the view stops
declaring it (see crate::depart). An exit is an Enter read
the other way: with a transition, the departing subtree is copied
out of the last frame that had it and replayed — frozen where
layout left it, on top, inert — while the slots this names ease
from where they were toward what it declares. Needs a stable key
across frames, and a transition with a duration; without both, a
removed node vanishes at once as it always did.
Implementations§
Trait Implementations§
impl StructuralPartialEq for AnimSpec
Auto Trait Implementations§
impl Freeze for AnimSpec
impl RefUnwindSafe for AnimSpec
impl Send for AnimSpec
impl Sync for AnimSpec
impl Unpin for AnimSpec
impl UnsafeUnpin for AnimSpec
impl UnwindSafe for AnimSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.