#[non_exhaustive]pub enum BitmapType {
Roaring32,
Roaring64,
}Expand description
Supported bitmap types for an .ahda record
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl BitmapType
impl BitmapType
Sourcepub fn from_u16(val: u16) -> Result<Self, Box<dyn Error>>
pub fn from_u16(val: u16) -> Result<Self, Box<dyn Error>>
Convert the u16 value stored in FileHeader or BlockHeader into a valid BitmapType.
§Errors
Returns InvalidConversion if the u16 value does not correspond to a valid BitmapType.
§Usage
use ahda::compression::BitmapType;
let u16_rep = 0_u16;
let bitmap_type = BitmapType::from_u16(u16_rep).unwrap();
assert_eq!(bitmap_type, BitmapType::Roaring32);Sourcepub fn to_u16(&self) -> u16
pub fn to_u16(&self) -> u16
Convert a BitmapType into a u16 value for storage in FileHeader or BlockHeader.
§Usage
use ahda::compression::BitmapType;
let bitmap_type = BitmapType::Roaring32;
let u16_rep = bitmap_type.to_u16();
assert_eq!(u16_rep, 0_u16);Trait Implementations§
Source§impl Clone for BitmapType
impl Clone for BitmapType
Source§fn clone(&self) -> BitmapType
fn clone(&self) -> BitmapType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BitmapType
impl Debug for BitmapType
Source§impl Default for BitmapType
impl Default for BitmapType
Source§fn default() -> BitmapType
fn default() -> BitmapType
Returns the “default value” for a type. Read more
impl Eq for BitmapType
Source§impl PartialEq for BitmapType
impl PartialEq for BitmapType
impl StructuralPartialEq for BitmapType
Auto Trait Implementations§
impl Freeze for BitmapType
impl RefUnwindSafe for BitmapType
impl Send for BitmapType
impl Sync for BitmapType
impl Unpin for BitmapType
impl UnsafeUnpin for BitmapType
impl UnwindSafe for BitmapType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.