[][src]Struct indexed_vec::IndexVec

pub struct IndexVec<I, T> where
    I: Idx
{ /* fields omitted */ }

Methods

impl<I, T> IndexVec<I, T> where
    I: Idx
[src]

pub fn new() -> Self[src]

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

pub fn from_elem<S>(elem: T, universe: &IndexVec<I, S>) -> Self where
    T: Clone
[src]

pub fn from_elem_n(elem: T, n: usize) -> Self where
    T: Clone
[src]

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

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

pub fn into_iter(self) -> IntoIter<T>[src]

pub fn into_iter_enumerated(self) -> Enumerated<I, IntoIter<T>>[src]

pub fn iter(&self) -> Iter<T>[src]

pub fn iter_mut(&mut self) -> IterMut<T>[src]

pub fn iter_enumerated(&self) -> Enumerated<I, Iter<T>>[src]

pub fn iter_enumerated_mut(&mut self) -> Enumerated<I, IterMut<T>>[src]

pub fn indices(&self) -> Map<Range<usize>, IntoIdx<I>>[src]

pub fn last_idx(&self) -> Option<I>[src]

pub fn next_idx(&self) -> I[src]

pub fn shrink_to_fit(&mut self)[src]

pub fn swap(&mut self, l: I, r: I)[src]

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

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

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

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

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

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

pub fn clear(&mut self)[src]

pub fn resize(&mut self, s: usize, v: T) where
    T: Clone
[src]

pub fn push(&mut self, d: T) -> I[src]

pub fn push_with_idx<F>(&mut self, f: F) -> I where
    F: FnOnce(I) -> T, 
[src]

Trait Implementations

impl<I: Clone, T: Clone> Clone for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> Debug for IndexVec<I, T> where
    I: Idx,
    T: Debug
[src]

impl<I, T> Default for IndexVec<I, T> where
    I: Idx
[src]

impl<'de, I, T> Deserialize<'de> for IndexVec<I, T> where
    I: Idx,
    T: Deserialize<'de>, 
[src]

impl<I: Eq, T: Eq> Eq for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> Extend<T> for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> FromIterator<T> for IndexVec<I, T> where
    I: Idx
[src]

impl<I: Hash, T: Hash> Hash for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> Index<I> for IndexVec<I, T> where
    I: Idx
[src]

type Output = T

The returned type after indexing.

impl<I, T> IndexMut<I> for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> IntoIterator for IndexVec<I, T> where
    I: Idx
[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<T>

Which kind of iterator are we turning this into?

impl<'a, I, T> IntoIterator for &'a IndexVec<I, T> where
    I: Idx
[src]

type Item = &'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<'a, I, T> IntoIterator for &'a mut IndexVec<I, T> where
    I: Idx
[src]

type Item = &'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<I: PartialEq, T: PartialEq> PartialEq<IndexVec<I, T>> for IndexVec<I, T> where
    I: Idx
[src]

impl<I: Idx, T> Send for IndexVec<I, T> where
    T: Send
[src]

impl<I, T> Serialize for IndexVec<I, T> where
    I: Idx,
    T: Serialize
[src]

impl<I, T> StructuralEq for IndexVec<I, T> where
    I: Idx
[src]

impl<I, T> StructuralPartialEq for IndexVec<I, T> where
    I: Idx
[src]

Auto Trait Implementations

impl<I, T> !RefUnwindSafe for IndexVec<I, T>

impl<I, T> Sync for IndexVec<I, T> where
    T: Sync

impl<I, T> !Unpin for IndexVec<I, T>

impl<I, T> !UnwindSafe for IndexVec<I, T>

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

impl<T, U> Into<U> for T where
    U: From<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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.