pub struct DynamicPrecisionIndexVec { /* private fields */ }
Expand description
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§
Source§impl DynamicPrecisionIndexVec
impl DynamicPrecisionIndexVec
Sourcepub fn get_u8(&self) -> Option<&Vec<u8>>
pub fn get_u8(&self) -> Option<&Vec<u8>>
If storage is currently done with u8 precision, returns a reference to the inner Vec
Sourcepub fn get_u8_mut(&mut self) -> Option<&mut Vec<u8>>
pub fn get_u8_mut(&mut self) -> Option<&mut Vec<u8>>
If storage is currently done with u8 precision, returns a mutable reference to the inner Vec
Sourcepub fn get_u16(&self) -> Option<&Vec<u16>>
pub fn get_u16(&self) -> Option<&Vec<u16>>
If storage is currently done with u16 precision, returns a reference to the inner Vec
Sourcepub fn get_u16_mut(&mut self) -> Option<&mut Vec<u16>>
pub fn get_u16_mut(&mut self) -> Option<&mut Vec<u16>>
If storage is currently done with u16 precision, returns a mutable reference to the inner Vec
Sourcepub fn get_u32(&self) -> Option<&Vec<u32>>
pub fn get_u32(&self) -> Option<&Vec<u32>>
If storage is currently done with u32 precision, returns a reference to the inner Vec
Sourcepub fn get_u32_mut(&mut self) -> Option<&mut Vec<u32>>
pub fn get_u32_mut(&mut self) -> Option<&mut Vec<u32>>
If storage is currently done with u32 precision, returns a mutable reference to the inner Vec
Sourcepub fn get_usize(&mut self) -> Option<&Vec<usize>>
pub fn get_usize(&mut self) -> Option<&Vec<usize>>
If storage is currently done with usize precision, returns a reference to the inner Vec
Sourcepub fn get_usize_mut(&mut self) -> Option<&mut Vec<usize>>
pub fn get_usize_mut(&mut self) -> Option<&mut Vec<usize>>
If storage is currently done with usize precision, returns a mutable reference to the inner Vec
Sourcepub fn get_usize_upgraded(&mut self) -> &Vec<usize>
pub fn get_usize_upgraded(&mut self) -> &Vec<usize>
First promotes the precision to usize, then returns a reference to the Vec
Sourcepub fn get_usize_upgraded_mut(&mut self) -> &mut Vec<usize>
pub fn get_usize_upgraded_mut(&mut self) -> &mut Vec<usize>
First promotes the precision to usize, then returns a mutable reference to the Vec
Trait Implementations§
Source§impl Clone for DynamicPrecisionIndexVec
impl Clone for DynamicPrecisionIndexVec
Source§fn clone(&self) -> DynamicPrecisionIndexVec
fn clone(&self) -> DynamicPrecisionIndexVec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Default for DynamicPrecisionIndexVec
impl Default for DynamicPrecisionIndexVec
Source§fn default() -> DynamicPrecisionIndexVec
fn default() -> DynamicPrecisionIndexVec
Source§impl IsIndexContainer for DynamicPrecisionIndexVec
impl IsIndexContainer for DynamicPrecisionIndexVec
Source§fn ensure_supported(&mut self, x: usize)
fn ensure_supported(&mut self, x: usize)
Source§fn iter(&self) -> IsIndexContainerIterator<'_, Self> ⓘ
fn iter(&self) -> IsIndexContainerIterator<'_, Self> ⓘ
Source§fn with_capacity(n: usize) -> Self
fn with_capacity(n: usize) -> Self
Source§fn with_support_for(x: usize) -> Self
fn with_support_for(x: usize) -> Self
Source§fn with_capacity_and_support_for(n: usize, x: usize) -> Self
fn with_capacity_and_support_for(n: usize, x: usize) -> Self
Auto Trait Implementations§
impl Freeze for DynamicPrecisionIndexVec
impl RefUnwindSafe for DynamicPrecisionIndexVec
impl Send for DynamicPrecisionIndexVec
impl Sync for DynamicPrecisionIndexVec
impl Unpin for DynamicPrecisionIndexVec
impl UnwindSafe for DynamicPrecisionIndexVec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more