[−][src]Struct bitrush_index::OZBCBitmap
Trait Implementations
impl<'_> BitAnd<&'_ OZBCBitmap> for &'_ OZBCBitmap
[src]
Impl BitAnd
running "logical and" bit operation between 2 bitmaps.
type Output = OZBCBitmap
The resulting type after applying the &
operator.
fn bitand(self, b2: Self) -> OZBCBitmap
[src]
impl Bitmap for OZBCBitmap
[src]
Impl Bitmap
to allow to use OZBCBitmap in [BitmapIndex
].
fn new() -> OZBCBitmap
[src]
Return new empty bitmap.
fn set(&mut self, i: u32)
[src]
Set the ith bit (starting from zero). You must set the bitmap in increasing
order otherwise nothing happend:
set(0), set(16), set(1000)
is the same of set(0), set(16), set(1000), set(50)
.
Example
use bitrush_index::OZBCBitmap; use bitrush_index::Bitmap; fn main() { let mut b0 = OZBCBitmap::new(); let mut b1 = b0.clone(); let values = [0, 1, 100, 100000, 2, 100001]; let values_ok = [0, 1, 100, 100000, 100001]; for val in values.iter() { b0.set(*val); } for val in values_ok.iter() { b1.set(*val); } assert_eq!(b0, b1); }
fn unroll_bitmap(&self) -> Vec<u32>
[src]
Return a vector with all positions of set bit.
fn size(&self) -> usize
[src]
Get bitmap content size.
fn write_to_buffer(&self, buffer_out: &mut [u8]) -> Result<usize, ()>
[src]
Write bitmap content into buffer_out and return the number of bytes written.
fn read_from_buffer(
&mut self,
buffer_in: &[u8],
check_bitmap: bool
) -> Result<(), ()>
[src]
&mut self,
buffer_in: &[u8],
check_bitmap: bool
) -> Result<(), ()>
Read bitmap content from buffer_in, buffer_in must have the exact length of bitmap content.
impl Clone for OZBCBitmap
[src]
fn clone(&self) -> OZBCBitmap
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OZBCBitmap
[src]
Impl [Debug
] trait printing each bit of every bitmap words.
impl PartialEq<OZBCBitmap> for OZBCBitmap
[src]
fn eq(&self, other: &OZBCBitmap) -> bool
[src]
fn ne(&self, other: &OZBCBitmap) -> bool
[src]
impl StructuralPartialEq for OZBCBitmap
[src]
Auto Trait Implementations
impl RefUnwindSafe for OZBCBitmap
impl Send for OZBCBitmap
impl Sync for OZBCBitmap
impl Unpin for OZBCBitmap
impl UnwindSafe for OZBCBitmap
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,