[][src]Struct ncollide_utils::data::SparseVec

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

A sparse vector data structure.

Methods

impl<T> SparseVec<T>[src]

pub fn new() -> SparseVec<T>[src]

Creates a new sparse vector data structure.

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

Adds an element to this vector and returns its index.

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

Attempts to remove an element from this vector and returns it.

pub fn clear(&mut self)[src]

Removes all elements from this vector.

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

Indicates whether this sparse vector is empty.

Trait Implementations

impl<T> Index<usize> for SparseVec<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<usize> for SparseVec<T>[src]

Auto Trait Implementations

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

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

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self