Enum opt_struct::static_vec::OptVec10
source · pub enum OptVec10<T> {
None,
One(T),
Two([T; 2]),
Three([T; 3]),
Four([T; 4]),
Five([T; 5]),
Six([T; 6]),
Seven([T; 7]),
Eight([T; 8]),
Nine([T; 9]),
Ten([T; 10]),
Vec(Vec<T>),
}Variants§
None
One(T)
Two([T; 2])
Three([T; 3])
Four([T; 4])
Five([T; 5])
Six([T; 6])
Seven([T; 7])
Eight([T; 8])
Nine([T; 9])
Ten([T; 10])
Vec(Vec<T>)
Implementations§
source§impl<T> OptVec10<T>
impl<T> OptVec10<T>
pub fn new() -> OptVec10<T>
pub fn with_capacity(sz: usize) -> OptVec10<T>
pub fn take(&mut self) -> OptVec10<T>
pub fn len(&self) -> usize
pub fn push(&mut self, el: T)
pub fn pop(&mut self) -> Option<T>
pub fn get(&self, i: usize) -> Option<&T>
pub fn get_mut(&mut self, i: usize) -> Option<&mut T>
pub fn iter(&self) -> Iter<'_, T> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, T> ⓘ
pub fn for_each<F: FnMut(&T)>(&self, f: F)
pub fn consume<F: FnMut(T)>(&mut self, f: F)
Trait Implementations§
source§impl<T> Extend<T> for OptVec10<T>
impl<T> Extend<T> for OptVec10<T>
source§fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<T> FromIterator<T> for OptVec10<T>
impl<T> FromIterator<T> for OptVec10<T>
source§impl<'t, T> IntoIterator for &'t OptVec10<T>
impl<'t, T> IntoIterator for &'t OptVec10<T>
source§impl<'t, T> IntoIterator for &'t mut OptVec10<T>
impl<'t, T> IntoIterator for &'t mut OptVec10<T>
source§impl<T> IntoIterator for OptVec10<T>
impl<T> IntoIterator for OptVec10<T>
source§impl<T: Ord> Ord for OptVec10<T>
impl<T: Ord> Ord for OptVec10<T>
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: PartialEq> PartialEq for OptVec10<T>
impl<T: PartialEq> PartialEq for OptVec10<T>
source§impl<T: PartialOrd> PartialOrd for OptVec10<T>
impl<T: PartialOrd> PartialOrd for OptVec10<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T: Eq> Eq for OptVec10<T>
impl<T> StructuralEq for OptVec10<T>
impl<T> StructuralPartialEq for OptVec10<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for OptVec10<T>where
T: RefUnwindSafe,
impl<T> Send for OptVec10<T>where
T: Send,
impl<T> Sync for OptVec10<T>where
T: Sync,
impl<T> Unpin for OptVec10<T>where
T: Unpin,
impl<T> UnwindSafe for OptVec10<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