pub struct PackedUints {
pub data: PackedEnum,
pub mask: usize,
pub length: usize,
}Fields§
§data: PackedEnum§mask: usize§length: usizeImplementations§
Source§impl PackedUints
impl PackedUints
pub fn new(length: usize) -> Self
pub fn filled(length: usize, value: usize) -> Self
pub fn from(values: &[usize]) -> Self
pub fn iter<'a>(&'a self) -> Box<dyn Iterator<Item = usize> + 'a>
pub fn get(&self, i: usize) -> usize
pub fn set(&mut self, i: usize, value: usize)
pub fn set_range(&mut self, start: usize, end: usize, value: usize)
pub fn set_range_step( &mut self, start: usize, end: usize, step: usize, value: usize, )
Sourcepub fn unpack_u8(&self) -> Vec<u8> ⓘ
pub fn unpack_u8(&self) -> Vec<u8> ⓘ
Same thing as iter().map(|value| value as u8).collect() but 5x faster
Sourcepub fn unpack_u16(&self) -> Vec<u16>
pub fn unpack_u16(&self) -> Vec<u16>
Same thing as iter().map(|value| value as u16).collect() but 5x faster
Sourcepub fn unpack_u32(&self) -> Vec<u32>
pub fn unpack_u32(&self) -> Vec<u32>
Same thing as iter().map(|value| value as u32).collect() but 5x faster
Trait Implementations§
Source§impl Clone for PackedUints
impl Clone for PackedUints
Source§fn clone(&self) -> PackedUints
fn clone(&self) -> PackedUints
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PackedUints
impl RefUnwindSafe for PackedUints
impl Send for PackedUints
impl Sync for PackedUints
impl Unpin for PackedUints
impl UnwindSafe for PackedUints
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
Mutably borrows from an owned value. Read more