Struct surgeshaper_asym::imports::imports::imports::ControlGroupArray [−]
pub struct ControlGroupArray<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> ControlGroupArray<T>
impl<T> ControlGroupArray<T>
pub fn new(initial_value: T) -> ControlGroupArray<T> where
T: Clone,
pub fn new(initial_value: T) -> ControlGroupArray<T> where
T: Clone,
Create a new array filled with the given value.
pub fn new_with<F>(initial_value: F) -> ControlGroupArray<T> where
F: Fn(ControlGroup) -> T,
pub fn new_with<F>(initial_value: F) -> ControlGroupArray<T> where
F: Fn(ControlGroup) -> T,
Create a new array using a closure to associate each enum variant with its initial value.
pub fn iter_enumerate(&'a self) -> impl Iterator<Item = (ControlGroup, &'a T)>
pub fn iter_enumerate(&'a self) -> impl Iterator<Item = (ControlGroup, &'a T)>
Iterate and Enumerate, where Enumerate yields enum variants instead of usize.
pub fn iter_mut_enumerate(
&'a mut self
) -> impl Iterator<Item = (ControlGroup, &'a mut T)>
pub fn iter_mut_enumerate(
&'a mut self
) -> impl Iterator<Item = (ControlGroup, &'a mut T)>
Iterate and Enumerate, where Enumerate yields enum variants instead of usize.
pub fn map<F, Q>(&self, f: F) -> ControlGroupArray<Q> where
F: Fn(&T) -> Q,
pub fn map<F, Q>(&self, f: F) -> ControlGroupArray<Q> where
F: Fn(&T) -> Q,
Returns an array like self, with function f applied to each element.
Trait Implementations
impl<T> Clone for ControlGroupArray<T> where
T: Clone,
impl<T> Clone for ControlGroupArray<T> where
T: Clone,
pub fn clone(&self) -> ControlGroupArray<T>
pub fn clone(&self) -> ControlGroupArray<T>
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl<T> Debug for ControlGroupArray<T> where
T: Debug,
impl<T> Debug for ControlGroupArray<T> where
T: Debug,
impl<T> Default for ControlGroupArray<T> where
T: Default,
impl<T> Default for ControlGroupArray<T> where
T: Default,
pub fn default() -> ControlGroupArray<T>
pub fn default() -> ControlGroupArray<T>
Returns the “default value” for a type. Read more
impl<T> Hash for ControlGroupArray<T> where
T: Hash,
impl<T> Hash for ControlGroupArray<T> where
T: Hash,
impl<T> Index<ControlGroup> for ControlGroupArray<T>
impl<T> Index<ControlGroup> for ControlGroupArray<T>
type Output = T
type Output = T
The returned type after indexing.
pub fn index(
&self,
x: ControlGroup
) -> &<ControlGroupArray<T> as Index<ControlGroup>>::Output
pub fn index(
&self,
x: ControlGroup
) -> &<ControlGroupArray<T> as Index<ControlGroup>>::Output
Performs the indexing (container[index]
) operation. Read more
impl<T> IndexMut<ControlGroup> for ControlGroupArray<T>
impl<T> IndexMut<ControlGroup> for ControlGroupArray<T>
pub fn index_mut(
&mut self,
x: ControlGroup
) -> &mut <ControlGroupArray<T> as Index<ControlGroup>>::Output
pub fn index_mut(
&mut self,
x: ControlGroup
) -> &mut <ControlGroupArray<T> as Index<ControlGroup>>::Output
Performs the mutable indexing (container[index]
) operation. Read more
impl<'a, T> IntoIterator for &'a mut ControlGroupArray<T>
impl<'a, T> IntoIterator for &'a mut ControlGroupArray<T>
impl<'a, T> IntoIterator for &'a ControlGroupArray<T>
impl<'a, T> IntoIterator for &'a ControlGroupArray<T>
impl<T> Ord for ControlGroupArray<T> where
T: Ord,
impl<T> Ord for ControlGroupArray<T> where
T: Ord,
pub fn cmp(&self, other: &ControlGroupArray<T>) -> Ordering
pub fn cmp(&self, other: &ControlGroupArray<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<ControlGroupArray<T>> for ControlGroupArray<T> where
T: PartialEq<T>,
impl<T> PartialEq<ControlGroupArray<T>> for ControlGroupArray<T> where
T: PartialEq<T>,
impl<T> PartialOrd<ControlGroupArray<T>> for ControlGroupArray<T> where
T: PartialOrd<T>,
impl<T> PartialOrd<ControlGroupArray<T>> for ControlGroupArray<T> where
T: PartialOrd<T>,
pub fn partial_cmp(&self, other: &ControlGroupArray<T>) -> Option<Ordering>
pub fn partial_cmp(&self, other: &ControlGroupArray<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 ControlGroupArray<T> where
T: Copy,
impl<T> Eq for ControlGroupArray<T> where
T: Eq,
Auto Trait Implementations
impl<T> RefUnwindSafe for ControlGroupArray<T> where
T: RefUnwindSafe,
impl<T> Send for ControlGroupArray<T> where
T: Send,
impl<T> Sync for ControlGroupArray<T> where
T: Sync,
impl<T> Unpin for ControlGroupArray<T> where
T: Unpin,
impl<T> UnwindSafe for ControlGroupArray<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more