Skip to main content

AnimationMin

Struct AnimationMin 

Source
pub struct AnimationMin { /* private fields */ }
Expand description

An animation that tracks the minimum of two other animations.

The value of this animation is the minimum of the values of first and next.

Dart’s AnimationMin<T extends num> is generic over int and double; Rust has no num supertype, so this is f64-only until a non-double use appears.

Implementations§

Source§

impl AnimationMin

Source

pub fn new( app: &mut App, first: Retained<AnyAnimation<f64>>, next: Retained<AnyAnimation<f64>>, ) -> Retained<Handle<AnimationMin>>

Creates an AnimationMin.

Either argument can be an AnimationMin itself to combine multiple animations.

Trait Implementations§

Source§

impl Animation<f64> for AnimationMin

Source§

fn add_listener(self: Handle<AnimationMin>, app: &mut App, listener: Listener)

Calls the listener every time the value of the animation changes. Read more
Source§

fn remove_listener( self: Handle<AnimationMin>, 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<AnimationMin>, app: &mut App, listener: AnimationStatusListener, )

Calls listener every time the status of the animation changes. Read more
Source§

fn remove_status_listener( self: Handle<AnimationMin>, app: &mut App, listener: &AnimationStatusListener, )

Stops calling the listener every time the status of the animation changes. Read more
Source§

fn status(self: Handle<AnimationMin>, app: &App) -> AnimationStatus

The current status of this animation.
Source§

fn value(self: Handle<AnimationMin>, app: &App) -> f64

The current value of the animation. Read more
Source§

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

Whether this animation is stopped at the end.
Source§

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

Whether the current aim of this animation is toward completion.
Source§

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

Dart’s Animation.toString: the identity and toStringDetails.
Source§

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 more
Source§

impl AnimationLazyListenerMixin for AnimationMin

Source§

fn lazy_listener_data( self: Handle<AnimationMin>, app: &App, ) -> &AnimationLazyListenerData

The mixin’s field on the host.
Source§

fn lazy_listener_data_mut( self: Handle<AnimationMin>, app: &mut App, ) -> &mut AnimationLazyListenerData

The mixin’s field on the host, mutably.
Source§

fn did_start_listening(self: Handle<AnimationMin>, app: &mut App)

Called when the number of listeners changes from zero to one. Read more
Source§

fn did_stop_listening(self: Handle<AnimationMin>, 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)

Calls did_start_listening every time a registration of a listener causes an empty list of listeners to become non-empty. Read more
Source§

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 more
Source§

fn is_listening(self: Handle<Self>, app: &App) -> bool

Whether there are any listeners.
Source§

impl AnimationLocalListenersMixin for AnimationMin

Source§

fn local_listeners_data( self: Handle<AnimationMin>, app: &App, ) -> &AnimationLocalListenersData

The mixin’s field on the host.
Source§

fn local_listeners_data_mut( self: Handle<AnimationMin>, app: &mut App, ) -> &mut AnimationLocalListenersData

The mixin’s field on the host, mutably.
Source§

fn did_register_listener(self: Handle<AnimationMin>, app: &mut App)

Called immediately before a listener is added via add_listener. Read more
Source§

fn did_unregister_listener(self: Handle<AnimationMin>, app: &mut App)

Called immediately after a listener is removed via remove_listener. Read more
Source§

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)

Stop calling the listener every time the value of the animation changes. Read more
Source§

fn clear_listeners(self: Handle<Self>, app: &mut App)

Removes all listeners added with add_listener. Read more
Source§

fn notify_listeners(self: Handle<Self>, app: &mut App)

Calls all the listeners. Read more
Source§

impl AnimationLocalStatusListenersMixin for AnimationMin

Source§

fn local_status_listeners_data( self: Handle<AnimationMin>, app: &App, ) -> &AnimationLocalStatusListenersData

The mixin’s field on the host.
Source§

fn local_status_listeners_data_mut( self: Handle<AnimationMin>, app: &mut App, ) -> &mut AnimationLocalStatusListenersData

The mixin’s field on the host, mutably.
Source§

fn did_register_listener(self: Handle<AnimationMin>, app: &mut App)

Called immediately before a status listener is added via add_status_listener. Read more
Source§

fn did_unregister_listener(self: Handle<AnimationMin>, app: &mut App)

Called immediately after a status listener is removed via remove_status_listener. Read more
Source§

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, )

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)

Removes all listeners added with add_status_listener. Read more
Source§

fn notify_status_listeners( self: Handle<Self>, app: &mut App, status: AnimationStatus, )

Calls all the status listeners. Read more
Source§

impl CompoundAnimation<f64> for AnimationMin

Source§

fn first(self: Handle<AnimationMin>, app: &App) -> AnyAnimation<f64>

The first sub-animation. Its status takes precedence if neither are animating.
Source§

fn next(self: Handle<AnimationMin>, app: &App) -> AnyAnimation<f64>

The second sub-animation.
Source§

fn last_status(self: Handle<AnimationMin>, app: &App) -> Option<AnimationStatus>

Dart’s _lastStatus, owned by the implementing type.
Source§

fn last_status_mut( self: Handle<AnimationMin>, app: &mut App, ) -> &mut Option<AnimationStatus>

Dart’s _lastStatus, mutably.
Source§

fn last_value(self: Handle<AnimationMin>, app: &App) -> &Option<f64>

Dart’s _lastValue, owned by the implementing type.
Source§

fn last_value_mut(self: Handle<AnimationMin>, app: &mut App) -> &mut Option<f64>

Dart’s _lastValue, mutably.
Source§

fn status(self: Handle<Self>, app: &App) -> AnimationStatus

Gets the status of this animation based on the first and next status. Read more
Source§

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)

Dart’s _maybeNotifyListeners.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>