pub struct BitLongVec {
pub capacity: usize,
pub bits_per_value: u8,
pub max_possible_value: u64,
pub data: Vec<u64>,
}Fields§
§capacity: usizeCapacity of array.
bits_per_value: u8Bits per value in internal storage.
max_possible_value: u64Maximum possible stored value.
data: Vec<u64>Internal storage for values.
Implementations§
Source§impl BitLongVec
impl BitLongVec
Sourcepub fn with_fixed_capacity(capacity: usize, bits_per_value: u8) -> Self
pub fn with_fixed_capacity(capacity: usize, bits_per_value: u8) -> Self
Create a fixed capacity vector. All values are will be initialized to 0.
§Panics
Panics if bits_per_value is greater or equals 64.
Sourcepub fn from_data(data: Vec<u64>, capacity: usize, bits_per_value: u8) -> Self
pub fn from_data(data: Vec<u64>, capacity: usize, bits_per_value: u8) -> Self
Create vector from long array.
§Panics
Panics if bits_per_value >= 64 or data length not match capacity.
Sourcepub fn set(&mut self, index: usize, value: u64)
pub fn set(&mut self, index: usize, value: u64)
Sets the value in the index position.
§Panics
Panics if index out of bounds or value exceeds maximum.
Sourcepub fn resize(&self, bits_per_block: u8) -> BitLongVec
pub fn resize(&self, bits_per_block: u8) -> BitLongVec
Return new vector resized to new bits_per_block.
§Panics
Panics if bits_per_value >= 64 or value after resize exceeds maximum.
Auto Trait Implementations§
impl Freeze for BitLongVec
impl RefUnwindSafe for BitLongVec
impl Send for BitLongVec
impl Sync for BitLongVec
impl Unpin for BitLongVec
impl UnwindSafe for BitLongVec
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