Struct surge_wavetable::imports::imports::imports::ValTypeArray [−]
pub struct ValTypeArray<T> { /* fields omitted */ }
Expand description
Container to associate each enum variant with a datum.
This is an array type and it implements much of the array API, with a few caveats and exceptions. The foremost deviation from the standard array API is that this container must be indexed using variants of the correct enum type.
Implementations
impl<T> ValTypeArray<T>
impl<T> ValTypeArray<T>
pub fn new(initial_value: T) -> ValTypeArray<T> where
T: Clone,
pub fn new(initial_value: T) -> ValTypeArray<T> where
T: Clone,
Create a new array filled with the given value.
pub fn new_with<F>(initial_value: F) -> ValTypeArray<T> where
F: Fn(ValType) -> T,
pub fn new_with<F>(initial_value: F) -> ValTypeArray<T> where
F: Fn(ValType) -> T,
Create a new array using a closure to associate each enum variant with its initial value.
Iterate and Enumerate, where Enumerate yields enum variants instead of usize.
Iterate and Enumerate, where Enumerate yields enum variants instead of usize.
pub fn map<F, Q>(&self, f: F) -> ValTypeArray<Q> where
F: Fn(&T) -> Q,
pub fn map<F, Q>(&self, f: F) -> ValTypeArray<Q> where
F: Fn(&T) -> Q,
Returns an array like self, with function f applied to each element.
Trait Implementations
impl<T> Clone for ValTypeArray<T> where
T: Clone,
impl<T> Clone for ValTypeArray<T> where
T: Clone,
pub fn clone(&self) -> ValTypeArray<T>
pub fn clone(&self) -> ValTypeArray<T>
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl<T> Debug for ValTypeArray<T> where
T: Debug,
impl<T> Debug for ValTypeArray<T> where
T: Debug,
impl<T> Default for ValTypeArray<T> where
T: Default,
impl<T> Default for ValTypeArray<T> where
T: Default,
pub fn default() -> ValTypeArray<T>
pub fn default() -> ValTypeArray<T>
Returns the “default value” for a type. Read more
impl<T> Hash for ValTypeArray<T> where
T: Hash,
impl<T> Hash for ValTypeArray<T> where
T: Hash,
impl<T> Index<ValType> for ValTypeArray<T>
impl<T> Index<ValType> for ValTypeArray<T>
impl<T> IndexMut<ValType> for ValTypeArray<T>
impl<T> IndexMut<ValType> for ValTypeArray<T>
impl<'a, T> IntoIterator for &'a mut ValTypeArray<T>
impl<'a, T> IntoIterator for &'a mut ValTypeArray<T>
impl<'a, T> IntoIterator for &'a ValTypeArray<T>
impl<'a, T> IntoIterator for &'a ValTypeArray<T>
impl<T> Ord for ValTypeArray<T> where
T: Ord,
impl<T> Ord for ValTypeArray<T> where
T: Ord,
pub fn cmp(&self, other: &ValTypeArray<T>) -> Ordering
pub fn cmp(&self, other: &ValTypeArray<T>) -> Ordering
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
impl<T> PartialEq<ValTypeArray<T>> for ValTypeArray<T> where
T: PartialEq<T>,
impl<T> PartialEq<ValTypeArray<T>> for ValTypeArray<T> where
T: PartialEq<T>,
impl<T> PartialOrd<ValTypeArray<T>> for ValTypeArray<T> where
T: PartialOrd<T>,
impl<T> PartialOrd<ValTypeArray<T>> for ValTypeArray<T> where
T: PartialOrd<T>,
pub fn partial_cmp(&self, other: &ValTypeArray<T>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ValTypeArray<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<T> Copy for ValTypeArray<T> where
T: Copy,
impl<T> Eq for ValTypeArray<T> where
T: Eq,
Auto Trait Implementations
impl<T> RefUnwindSafe for ValTypeArray<T> where
T: RefUnwindSafe,
impl<T> Send for ValTypeArray<T> where
T: Send,
impl<T> Sync for ValTypeArray<T> where
T: Sync,
impl<T> Unpin for ValTypeArray<T> where
T: Unpin,
impl<T> UnwindSafe for ValTypeArray<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more