Struct zng_var::animation::ModifyInfo
source · 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.
Trait Implementations§
source§impl Clone for ModifyInfo
impl Clone for ModifyInfo
source§fn clone(&self) -> ModifyInfo
fn clone(&self) -> ModifyInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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>
Converts
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>
Converts
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