pub struct BitmapBuilder { /* private fields */ }
Expand description
Used to build bitmaps bool-by-bool in sequential order.
Implementations§
Source§impl BitmapBuilder
impl BitmapBuilder
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn set_bits(&self) -> usize
pub fn unset_bits(&self) -> usize
pub fn with_capacity(bits: usize) -> Self
pub fn reserve(&mut self, additional: usize)
pub fn push(&mut self, x: bool)
Sourcepub unsafe fn push_unchecked(&mut self, x: bool)
pub unsafe fn push_unchecked(&mut self, x: bool)
§Safety
self.len() < self.capacity() must hold.
pub fn extend_constant(&mut self, length: usize, value: bool)
Sourcepub unsafe fn push_word_with_len_unchecked(&mut self, word: u64, length: usize)
pub unsafe fn push_word_with_len_unchecked(&mut self, word: u64, length: usize)
Pushes the first length bits from the given word, assuming the rest of the bits are zero.
§Safety
self.len + length <= self.cap and length <= 64 must hold.
pub fn extend_from_slice(&mut self, slice: &[u8], offset: usize, length: usize)
pub fn extend_from_bitmap(&mut self, bitmap: &Bitmap)
Sourcepub fn into_mut(self) -> MutableBitmap
pub fn into_mut(self) -> MutableBitmap
Converts this BitmapBuilder into a mutable bitmap.
Sourcepub fn into_opt_mut_validity(self) -> Option<MutableBitmap>
pub fn into_opt_mut_validity(self) -> Option<MutableBitmap>
The same as into_mut, but returns None if the bitmap is all-ones.
Sourcepub fn into_opt_validity(self) -> Option<Bitmap>
pub fn into_opt_validity(self) -> Option<Bitmap>
The same as freeze, but returns None if the bitmap is all-ones.
pub fn extend_trusted_len_iter<I>(&mut self, iterator: I)
pub fn from_trusted_len_iter<I>(iterator: I) -> Self
Trait Implementations§
Source§impl Clone for BitmapBuilder
impl Clone for BitmapBuilder
Source§fn clone(&self) -> BitmapBuilder
fn clone(&self) -> BitmapBuilder
Returns a copy 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 moreSource§impl Default for BitmapBuilder
impl Default for BitmapBuilder
Source§fn default() -> BitmapBuilder
fn default() -> BitmapBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BitmapBuilder
impl RefUnwindSafe for BitmapBuilder
impl Send for BitmapBuilder
impl Sync for BitmapBuilder
impl Unpin for BitmapBuilder
impl UnwindSafe for BitmapBuilder
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<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> ⓘ
Converts
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> ⓘ
Converts
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