#[repr(transparent)]pub struct Oscillator<T: ?Sized>(pub T);Expand description
An Oscillator is a wrapper around a Tween which places the Tween into an infinite ping pong.
This is similar to a Looper, but instead of restarting the tween at the beginning, it restarts it at the end and travels backwards. For many Tweens in this library, this is the same
Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<T: Clone + ?Sized> Clone for Oscillator<T>
impl<T: Clone + ?Sized> Clone for Oscillator<T>
Source§fn clone(&self) -> Oscillator<T>
fn clone(&self) -> Oscillator<T>
Returns a duplicate 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 moreSource§impl<T: Ord + ?Sized> Ord for Oscillator<T>
impl<T: Ord + ?Sized> Ord for Oscillator<T>
Source§fn cmp(&self, other: &Oscillator<T>) -> Ordering
fn cmp(&self, other: &Oscillator<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + ?Sized> PartialOrd for Oscillator<T>
impl<T: PartialOrd + ?Sized> PartialOrd for Oscillator<T>
Source§impl<Value, T> Tween<Value> for Oscillator<T>where
Value: TweenValue,
T: Tween<Value>,
impl<Value, T> Tween<Value> for Oscillator<T>where
Value: TweenValue,
T: Tween<Value>,
Source§fn tween(&mut self, value_delta: Value, percent: f32) -> Value
fn tween(&mut self, value_delta: Value, percent: f32) -> Value
Returns a new value based on the value_delta and the percent. Read more
Source§fn is_finite(&self) -> bool
fn is_finite(&self) -> bool
All Tweens in this library use this default method, except Looper and Oscillator, which
which are both unbounded (because they never stop returning values), and Extrapolator,
which simply unbounds tweens. Read more
impl<T: Copy + ?Sized> Copy for Oscillator<T>
impl<T: Eq + ?Sized> Eq for Oscillator<T>
impl<T: ?Sized> StructuralPartialEq for Oscillator<T>
Auto Trait Implementations§
impl<T> Freeze for Oscillator<T>
impl<T> RefUnwindSafe for Oscillator<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Oscillator<T>
impl<T> Sync for Oscillator<T>
impl<T> Unpin for Oscillator<T>
impl<T> UnsafeUnpin for Oscillator<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for Oscillator<T>where
T: UnwindSafe + ?Sized,
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