pub struct AnimationMean { /* private fields */ }Expand description
An animation of f64s that tracks the mean of two other animations.
The status of this animation is the status of the right animation if it
is moving, and the left animation otherwise.
The value of this animation is the f64 that represents the mean value
of the values of the left and right animations.
Implementations§
Source§impl AnimationMean
impl AnimationMean
Sourcepub fn new(
app: &mut App,
left: Retained<AnyAnimation<f64>>,
right: Retained<AnyAnimation<f64>>,
) -> Retained<Handle<AnimationMean>>
pub fn new( app: &mut App, left: Retained<AnyAnimation<f64>>, right: Retained<AnyAnimation<f64>>, ) -> Retained<Handle<AnimationMean>>
Creates an animation that tracks the mean of two other animations, which it keeps.
Trait Implementations§
Source§impl Animation<f64> for AnimationMean
impl Animation<f64> for AnimationMean
Source§fn add_listener(self: Handle<AnimationMean>, app: &mut App, listener: Listener)
fn add_listener(self: Handle<AnimationMean>, app: &mut App, listener: Listener)
Calls the listener every time the value of the animation changes. Read more
Source§fn remove_listener(
self: Handle<AnimationMean>,
app: &mut App,
listener: &Listener,
)
fn remove_listener( self: Handle<AnimationMean>, app: &mut App, listener: &Listener, )
Stop calling the listener every time the value of the animation
changes. Read more
Source§fn add_status_listener(
self: Handle<AnimationMean>,
app: &mut App,
listener: AnimationStatusListener,
)
fn add_status_listener( self: Handle<AnimationMean>, app: &mut App, listener: AnimationStatusListener, )
Calls listener every time the status of the animation changes. Read more
Source§fn remove_status_listener(
self: Handle<AnimationMean>,
app: &mut App,
listener: &AnimationStatusListener,
)
fn remove_status_listener( self: Handle<AnimationMean>, app: &mut App, listener: &AnimationStatusListener, )
Stops calling the listener every time the status of the animation
changes. Read more
Source§fn status(self: Handle<AnimationMean>, app: &App) -> AnimationStatus
fn status(self: Handle<AnimationMean>, app: &App) -> AnimationStatus
The current status of this animation.
Source§fn value(self: Handle<AnimationMean>, app: &App) -> f64
fn value(self: Handle<AnimationMean>, app: &App) -> f64
The current value of the animation. Read more
Source§fn is_dismissed(self: Handle<Self>, app: &App) -> bool
fn is_dismissed(self: Handle<Self>, app: &App) -> bool
Whether this animation is stopped at the beginning.
Source§fn is_completed(self: Handle<Self>, app: &App) -> bool
fn is_completed(self: Handle<Self>, app: &App) -> bool
Whether this animation is stopped at the end.
Source§fn is_animating(self: Handle<Self>, app: &App) -> bool
fn is_animating(self: Handle<Self>, app: &App) -> bool
Whether this animation is running in either direction.
Source§fn is_forward_or_completed(self: Handle<Self>, app: &App) -> bool
fn is_forward_or_completed(self: Handle<Self>, app: &App) -> bool
Whether the current aim of this animation is toward completion.
Source§fn to_string_details(self: Handle<Self>, app: &App) -> String
fn to_string_details(self: Handle<Self>, app: &App) -> String
Dart’s
Animation.toStringDetails: the status as its arrow.Source§fn to_string(self: Handle<Self>, app: &App) -> String
fn to_string(self: Handle<Self>, app: &App) -> String
Dart’s
Animation.toString: the identity and toStringDetails.Source§fn as_animation(self: Handle<Self>) -> AnyAnimation<T>
fn as_animation(self: Handle<Self>) -> AnyAnimation<T>
This animation as the erased
AnyAnimation<T> — what to pass where
a Dart API takes an Animation<T>. Read moreSource§impl AnimationLazyListenerMixin for AnimationMean
impl AnimationLazyListenerMixin for AnimationMean
Source§fn lazy_listener_data(
self: Handle<AnimationMean>,
app: &App,
) -> &AnimationLazyListenerData
fn lazy_listener_data( self: Handle<AnimationMean>, app: &App, ) -> &AnimationLazyListenerData
The mixin’s field on the host.
Source§fn lazy_listener_data_mut(
self: Handle<AnimationMean>,
app: &mut App,
) -> &mut AnimationLazyListenerData
fn lazy_listener_data_mut( self: Handle<AnimationMean>, app: &mut App, ) -> &mut AnimationLazyListenerData
The mixin’s field on the host, mutably.
Source§fn did_start_listening(self: Handle<AnimationMean>, app: &mut App)
fn did_start_listening(self: Handle<AnimationMean>, app: &mut App)
Called when the number of listeners changes from zero to one. Read more
Source§fn did_stop_listening(self: Handle<AnimationMean>, app: &mut App)
fn did_stop_listening(self: Handle<AnimationMean>, app: &mut App)
Called when the number of listeners changes from one to zero.
Source§fn did_register_listener(self: Handle<Self>, app: &mut App)
fn did_register_listener(self: Handle<Self>, app: &mut App)
Calls
did_start_listening every time a registration of a listener
causes an empty list of listeners to become non-empty. Read moreSource§fn did_unregister_listener(self: Handle<Self>, app: &mut App)
fn did_unregister_listener(self: Handle<Self>, app: &mut App)
Calls
did_stop_listening when an only remaining listener is
unregistered, thus making the list empty. Read moreSource§impl AnimationLocalListenersMixin for AnimationMean
impl AnimationLocalListenersMixin for AnimationMean
Source§fn local_listeners_data(
self: Handle<AnimationMean>,
app: &App,
) -> &AnimationLocalListenersData
fn local_listeners_data( self: Handle<AnimationMean>, app: &App, ) -> &AnimationLocalListenersData
The mixin’s field on the host.
Source§fn local_listeners_data_mut(
self: Handle<AnimationMean>,
app: &mut App,
) -> &mut AnimationLocalListenersData
fn local_listeners_data_mut( self: Handle<AnimationMean>, app: &mut App, ) -> &mut AnimationLocalListenersData
The mixin’s field on the host, mutably.
Source§fn did_register_listener(self: Handle<AnimationMean>, app: &mut App)
fn did_register_listener(self: Handle<AnimationMean>, app: &mut App)
Called immediately before a listener is added via
add_listener. Read moreSource§fn did_unregister_listener(self: Handle<AnimationMean>, app: &mut App)
fn did_unregister_listener(self: Handle<AnimationMean>, app: &mut App)
Called immediately after a listener is removed via
remove_listener. Read moreSource§fn add_listener(self: Handle<Self>, app: &mut App, listener: Listener)
fn add_listener(self: Handle<Self>, app: &mut App, listener: Listener)
Calls the listener every time the value of the animation changes. Read more
Source§fn remove_listener(self: Handle<Self>, app: &mut App, listener: &Listener)
fn remove_listener(self: Handle<Self>, app: &mut App, listener: &Listener)
Stop calling the listener every time the value of the animation changes. Read more
Source§fn clear_listeners(self: Handle<Self>, app: &mut App)
fn clear_listeners(self: Handle<Self>, app: &mut App)
Removes all listeners added with
add_listener. Read moreSource§impl AnimationLocalStatusListenersMixin for AnimationMean
impl AnimationLocalStatusListenersMixin for AnimationMean
Source§fn local_status_listeners_data(
self: Handle<AnimationMean>,
app: &App,
) -> &AnimationLocalStatusListenersData
fn local_status_listeners_data( self: Handle<AnimationMean>, app: &App, ) -> &AnimationLocalStatusListenersData
The mixin’s field on the host.
Source§fn local_status_listeners_data_mut(
self: Handle<AnimationMean>,
app: &mut App,
) -> &mut AnimationLocalStatusListenersData
fn local_status_listeners_data_mut( self: Handle<AnimationMean>, app: &mut App, ) -> &mut AnimationLocalStatusListenersData
The mixin’s field on the host, mutably.
Source§fn did_register_listener(self: Handle<AnimationMean>, app: &mut App)
fn did_register_listener(self: Handle<AnimationMean>, app: &mut App)
Called immediately before a status listener is added via
add_status_listener. Read moreSource§fn did_unregister_listener(self: Handle<AnimationMean>, app: &mut App)
fn did_unregister_listener(self: Handle<AnimationMean>, app: &mut App)
Called immediately after a status listener is removed via
remove_status_listener. Read moreSource§fn add_status_listener(
self: Handle<Self>,
app: &mut App,
listener: AnimationStatusListener,
)
fn add_status_listener( self: Handle<Self>, app: &mut App, listener: AnimationStatusListener, )
Calls listener every time the status of the animation changes. Read more
Source§fn remove_status_listener(
self: Handle<Self>,
app: &mut App,
listener: &AnimationStatusListener,
)
fn remove_status_listener( self: Handle<Self>, app: &mut App, listener: &AnimationStatusListener, )
Stops calling the listener every time the status of the animation changes. Read more
Source§fn clear_status_listeners(self: Handle<Self>, app: &mut App)
fn clear_status_listeners(self: Handle<Self>, app: &mut App)
Removes all listeners added with
add_status_listener. Read moreSource§fn notify_status_listeners(
self: Handle<Self>,
app: &mut App,
status: AnimationStatus,
)
fn notify_status_listeners( self: Handle<Self>, app: &mut App, status: AnimationStatus, )
Calls all the status listeners. Read more
Source§impl CompoundAnimation<f64> for AnimationMean
impl CompoundAnimation<f64> for AnimationMean
Source§fn first(self: Handle<AnimationMean>, app: &App) -> AnyAnimation<f64>
fn first(self: Handle<AnimationMean>, app: &App) -> AnyAnimation<f64>
The first sub-animation. Its status takes precedence if neither are
animating.
Source§fn next(self: Handle<AnimationMean>, app: &App) -> AnyAnimation<f64>
fn next(self: Handle<AnimationMean>, app: &App) -> AnyAnimation<f64>
The second sub-animation.
Source§fn last_status(
self: Handle<AnimationMean>,
app: &App,
) -> Option<AnimationStatus>
fn last_status( self: Handle<AnimationMean>, app: &App, ) -> Option<AnimationStatus>
Dart’s
_lastStatus, owned by the implementing type.Source§fn last_status_mut(
self: Handle<AnimationMean>,
app: &mut App,
) -> &mut Option<AnimationStatus>
fn last_status_mut( self: Handle<AnimationMean>, app: &mut App, ) -> &mut Option<AnimationStatus>
Dart’s
_lastStatus, mutably.Source§fn last_value(self: Handle<AnimationMean>, app: &App) -> &Option<f64>
fn last_value(self: Handle<AnimationMean>, app: &App) -> &Option<f64>
Dart’s
_lastValue, owned by the implementing type.Source§fn last_value_mut(
self: Handle<AnimationMean>,
app: &mut App,
) -> &mut Option<f64>
fn last_value_mut( self: Handle<AnimationMean>, app: &mut App, ) -> &mut Option<f64>
Dart’s
_lastValue, mutably.Source§fn maybe_notify_status_listeners(
self: Handle<Self>,
app: &mut App,
_status: AnimationStatus,
)
fn maybe_notify_status_listeners( self: Handle<Self>, app: &mut App, _status: AnimationStatus, )
Dart’s
_maybeNotifyStatusListeners.Source§fn maybe_notify_listeners(self: Handle<Self>, app: &mut App)
fn maybe_notify_listeners(self: Handle<Self>, app: &mut App)
Dart’s
_maybeNotifyListeners.Auto Trait Implementations§
impl !RefUnwindSafe for AnimationMean
impl !Send for AnimationMean
impl !Sync for AnimationMean
impl !UnwindSafe for AnimationMean
impl Forget for AnimationMean
impl Freeze for AnimationMeanwhere
NonZero<u32>: Freeze,
&'static AnimationVTable<f64>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<Listener, usize>>: Freeze,
PhantomData<AnimationStatusListener>: Freeze,
PhantomData<(AnimationStatusListener, ())>: Freeze,
impl Move for AnimationMean
impl Unpin for AnimationMean
impl UnsafeUnpin for AnimationMeanwhere
NonZeroU32Inner: UnsafeUnpin,
&'static AnimationVTable<f64>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<Listener, usize>>: UnsafeUnpin,
PhantomData<AnimationStatusListener>: UnsafeUnpin,
PhantomData<(AnimationStatusListener, ())>: UnsafeUnpin,
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