pub enum ValueChange<T: Copy + Into<f64>> {
Absolute(T),
Relative(f64),
}Expand description
Represents a change of a value (e.g. of a parameter).
Variants§
Absolute(T)
Sets the given value absolutely.
Relative(f64)
Increments or decrements the current value by the given amount.
Trait Implementations§
Source§impl<T: Clone + Copy + Into<f64>> Clone for ValueChange<T>
impl<T: Clone + Copy + Into<f64>> Clone for ValueChange<T>
Source§fn clone(&self) -> ValueChange<T>
fn clone(&self) -> ValueChange<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: PartialEq + Copy + Into<f64>> PartialEq for ValueChange<T>
impl<T: PartialEq + Copy + Into<f64>> PartialEq for ValueChange<T>
Source§fn eq(&self, other: &ValueChange<T>) -> bool
fn eq(&self, other: &ValueChange<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: PartialEq + Copy + Into<f64>> StructuralPartialEq for ValueChange<T>
Auto Trait Implementations§
impl<T> Freeze for ValueChange<T>where
T: Freeze,
impl<T> RefUnwindSafe for ValueChange<T>where
T: RefUnwindSafe,
impl<T> Send for ValueChange<T>where
T: Send,
impl<T> Sync for ValueChange<T>where
T: Sync,
impl<T> Unpin for ValueChange<T>where
T: Unpin,
impl<T> UnsafeUnpin for ValueChange<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ValueChange<T>where
T: UnwindSafe,
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