pub struct ModifyInfo { /* private fields */ }Expand description
Represents the current modify operation when it is applying.
Implementations§
Source§impl ModifyInfo
impl ModifyInfo
Sourcepub fn importance(&self) -> usize
pub fn importance(&self) -> usize
Indicates the override importance of the operation, when two animations target a variable only the newer one must apply, and all running animations are overridden by a later modify/set operation.
Variables ignore modify requests from lower importance closures.
Sourcepub fn is_animating(&self) -> bool
pub fn is_animating(&self) -> bool
Indicates if the modify request was made from inside an animation, if true the importance
is for that animation, even if the modify request is from the current frame.
You can clone this info to track this animation, when it stops or is dropped this returns false. Note
that sleeping animations still count as animating.
Sourcepub fn animation_eq(&self, other: &Self) -> bool
pub fn animation_eq(&self, other: &Self) -> bool
Returns true if self and other have the same animation or are both not animating.
Sourcepub fn hook_animation_stop(
&self,
handler: SmallBox<dyn FnMut() + Send + 'static, S4>,
) -> VarHandle
pub fn hook_animation_stop( &self, handler: SmallBox<dyn FnMut() + Send + 'static, S4>, ) -> VarHandle
Register a handler to be called once when the current animation stops.
Trait Implementations§
Source§impl Clone for ModifyInfo
impl Clone for ModifyInfo
Source§fn clone(&self) -> ModifyInfo
fn clone(&self) -> ModifyInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ModifyInfo
impl !RefUnwindSafe for ModifyInfo
impl Send for ModifyInfo
impl Sync for ModifyInfo
impl Unpin for ModifyInfo
impl !UnwindSafe for ModifyInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more