[][src]Struct rust_3d::DynamicPrecisionIndexVec

pub struct DynamicPrecisionIndexVec { /* fields omitted */ }

DynamicPrecisionIndexVec is a memory efficient container with a usize interface. It uses u8 -> u16 -> u32 -> usize for storage depending on the largest index's size

Implementations

impl DynamicPrecisionIndexVec[src]

pub fn new() -> Self[src]

Creates a new DynamicPrecisionIndexVec with u8 precision

pub fn get_u8(&self) -> Option<&Vec<u8>>[src]

If storage is currently done with u8 precision, returns a reference to the inner Vec

pub fn get_u8_mut(&mut self) -> Option<&mut Vec<u8>>[src]

If storage is currently done with u8 precision, returns a mutable reference to the inner Vec

pub fn get_u16(&self) -> Option<&Vec<u16>>[src]

If storage is currently done with u16 precision, returns a reference to the inner Vec

pub fn get_u16_mut(&mut self) -> Option<&mut Vec<u16>>[src]

If storage is currently done with u16 precision, returns a mutable reference to the inner Vec

pub fn get_u32(&self) -> Option<&Vec<u32>>[src]

If storage is currently done with u32 precision, returns a reference to the inner Vec

pub fn get_u32_mut(&mut self) -> Option<&mut Vec<u32>>[src]

If storage is currently done with u32 precision, returns a mutable reference to the inner Vec

pub fn get_usize(&mut self) -> Option<&Vec<usize>>[src]

If storage is currently done with usize precision, returns a reference to the inner Vec

pub fn get_usize_mut(&mut self) -> Option<&mut Vec<usize>>[src]

If storage is currently done with usize precision, returns a mutable reference to the inner Vec

pub fn get_usize_upgraded(&mut self) -> &Vec<usize>[src]

First promotes the precision to usize, then returns a reference to the Vec. Calling this might unnecessarily increase memory usage

pub fn get_usize_upgraded_mut(&mut self) -> &mut Vec<usize>[src]

First promotes the precision to usize, then returns a mutable reference to the Vec. Calling this might unnecessarily increase memory usage

Trait Implementations

impl Clone for DynamicPrecisionIndexVec[src]

impl Default for DynamicPrecisionIndexVec[src]

impl<'_> From<&'_ Vec<u16>> for DynamicPrecisionIndexVec[src]

impl<'_> From<&'_ Vec<u32>> for DynamicPrecisionIndexVec[src]

impl<'_> From<&'_ Vec<u8>> for DynamicPrecisionIndexVec[src]

impl<'_> From<&'_ Vec<usize>> for DynamicPrecisionIndexVec[src]

impl From<Vec<u16>> for DynamicPrecisionIndexVec[src]

impl From<Vec<u32>> for DynamicPrecisionIndexVec[src]

impl From<Vec<u8>> for DynamicPrecisionIndexVec[src]

impl From<Vec<usize>> for DynamicPrecisionIndexVec[src]

impl IsIndexContainer for DynamicPrecisionIndexVec[src]

Auto Trait Implementations

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> From<T> for T[src]

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, 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.