[][src]Trait rust_3d::IsIndexContainer

pub trait IsIndexContainer: Clone + Default {
    fn reserve(&mut self, n: usize);
fn ensure_supported(&mut self, x: usize);
fn len(&self) -> usize;
fn get(&self, index: usize) -> usize;
fn set(&mut self, index: usize, value: usize);
fn push(&mut self, value: usize);
fn iter(&self) -> IsIndexContainerIterator<Self>

Important traits for IsIndexContainerIterator<'a, IC>

impl<'a, IC> Iterator for IsIndexContainerIterator<'a, IC> where
    IC: IsIndexContainer
type Item = usize;
; fn with_capacity(n: usize) -> Self { ... }
fn with_support_for(x: usize) -> Self { ... }
fn with_capacity_and_support_for(n: usize, x: usize) -> Self { ... } }

IsIndexContainer trait for containers holding indices

Required methods

fn reserve(&mut self, n: usize)

Should reserve space for n more elements

fn ensure_supported(&mut self, x: usize)

Should ensure that given number can be supported

fn len(&self) -> usize

Should return the number of elements

fn get(&self, index: usize) -> usize

Should return the element at index

fn set(&mut self, index: usize, value: usize)

Should overwrite the element at index with value

fn push(&mut self, value: usize)

Should push value to the end of the container

fn iter(&self) -> IsIndexContainerIterator<Self>

Important traits for IsIndexContainerIterator<'a, IC>

impl<'a, IC> Iterator for IsIndexContainerIterator<'a, IC> where
    IC: IsIndexContainer
type Item = usize;

Should return an iterator over the values

Loading content...

Provided methods

fn with_capacity(n: usize) -> Self

Creates a new object with the given capacity

fn with_support_for(x: usize) -> Self

Creates a new object that can support the given number

fn with_capacity_and_support_for(n: usize, x: usize) -> Self

Creates a new object with the given capacity and support for the given number

Loading content...

Implementations on Foreign Types

impl IsIndexContainer for Vec<usize>[src]

Loading content...

Implementors

impl IsIndexContainer for DynamicPrecisionIndexVec[src]

impl IsIndexContainer for U32IndexVec[src]

Loading content...