[][src]Struct vec_option::VecOption

pub struct VecOption<T> { /* fields omitted */ }

Methods

impl<T> VecOption<T>[src]

pub fn new() -> Self[src]

pub fn with_capacity(cap: usize) -> Self[src]

pub fn push<V: Into<Option<T>>>(&mut self, value: V)[src]

pub fn reserve(&mut self, amount: usize)[src]

pub fn reserve_exact(&mut self, amount: usize)[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn pop(&mut self) -> Option<Option<T>>[src]

pub fn get_mut(&mut self, index: usize) -> Option<Option<&mut T>>[src]

pub fn get(&self, index: usize) -> Option<Option<&T>>[src]

pub fn swap(&mut self, a: usize, b: usize)[src]

pub fn take(&mut self, index: usize) -> Option<Option<T>>[src]

pub fn put(&mut self, index: usize, value: T) -> Option<Option<T>>[src]

pub fn replace(&mut self, index: usize, value: Option<T>) -> Option<Option<T>>[src]

pub fn extend_none(&mut self, additional: usize)[src]

pub fn truncate(&mut self, len: usize)[src]

pub fn clear(&mut self)[src]

Important traits for Iter<'a, T>
pub fn iter(&self) -> Iter<T>[src]

Important traits for IterMut<'a, T>
pub fn iter_mut(&mut self) -> IterMut<T>[src]

pub fn try_fold<A, B, F: FnMut(A, usize, &mut Option<T>) -> Result<A, B>>(
    &mut self,
    init: A,
    f: F
) -> Result<A, B>
[src]

pub fn fold<A, F: FnMut(A, usize, &mut Option<T>) -> A>(
    &mut self,
    init: A,
    f: F
) -> A
[src]

pub fn try_for_each<B, F: FnMut(usize, &mut Option<T>) -> Result<(), B>>(
    &mut self,
    f: F
) -> Result<(), B>
[src]

pub fn for_each<F: FnMut(usize, &mut Option<T>)>(&mut self, f: F)[src]

pub fn set_all_none(&mut self)[src]

Trait Implementations

impl<T> Default for VecOption<T>[src]

impl<T> Drop for VecOption<T>[src]

impl<T: Ord> Ord for VecOption<T>[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<T: Clone> Clone for VecOption<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<VecOption<T>> for VecOption<T>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T: PartialEq> PartialEq<[T]> for VecOption<T>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T: PartialEq, S: AsRef<[Option<T>]>> PartialEq<S> for VecOption<T>[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl<T> Extend<Option<T>> for VecOption<T>[src]

impl<T> Extend<T> for VecOption<T>[src]

impl<T> From<Vec<T>> for VecOption<T>[src]

impl<T> From<Vec<Option<T>>> for VecOption<T>[src]

impl<T: Eq> Eq for VecOption<T>[src]

impl<T> IntoIterator for VecOption<T>[src]

type Item = Option<T>

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a mut VecOption<T>[src]

type Item = Option<&'a mut T>

The type of the elements being iterated over.

type IntoIter = IterMut<'a, T>

Which kind of iterator are we turning this into?

impl<'a, T> IntoIterator for &'a VecOption<T>[src]

type Item = Option<&'a T>

The type of the elements being iterated over.

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?

impl<T: PartialOrd> PartialOrd<VecOption<T>> for VecOption<T>[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: Debug> Debug for VecOption<T>[src]

impl<T: Hash> Hash for VecOption<T>[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> FromIterator<Option<T>> for VecOption<T>[src]

Auto Trait Implementations

impl<T> Sync for VecOption<T> where
    T: Sync

impl<T> Unpin for VecOption<T> where
    T: Unpin

impl<T> Send for VecOption<T> where
    T: Send

impl<T> UnwindSafe for VecOption<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for VecOption<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]