Struct arrow::array::BooleanBufferBuilder
source · [−]pub struct BooleanBufferBuilder { /* private fields */ }
Implementations
sourceimpl BooleanBufferBuilder
impl BooleanBufferBuilder
pub fn new(capacity: usize) -> Self
pub fn len(&self) -> usize
pub fn set_bit(&mut self, index: usize, v: bool)
pub fn get_bit(&self, index: usize) -> bool
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn advance(&mut self, additional: usize)
sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserve space to at least additional
new bits.
Capacity will be >= self.len() + additional
.
New bytes are uninitialized and reading them is undefined behavior.
sourcepub fn resize(&mut self, len: usize)
pub fn resize(&mut self, len: usize)
Resizes the buffer, either truncating its contents (with no change in capacity), or
growing it (potentially reallocating it) and writing false
in the newly available bits.
pub fn append(&mut self, v: bool)
pub fn append_n(&mut self, additional: usize, v: bool)
pub fn append_slice(&mut self, slice: &[bool])
sourcepub fn append_packed_range(&mut self, range: Range<usize>, to_set: &[u8])
pub fn append_packed_range(&mut self, range: Range<usize>, to_set: &[u8])
Append range
bits from to_set
to_set
is a slice of bits packed LSB-first into [u8]
Panics
Panics if to_set
does not contain ceil(range.end / 8)
bytes
sourcepub fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns the packed bits
pub fn finish(&mut self) -> Buffer
Trait Implementations
sourceimpl Debug for BooleanBufferBuilder
impl Debug for BooleanBufferBuilder
sourceimpl From<BooleanBufferBuilder> for Buffer
impl From<BooleanBufferBuilder> for Buffer
sourcefn from(builder: BooleanBufferBuilder) -> Self
fn from(builder: BooleanBufferBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for BooleanBufferBuilder
impl Send for BooleanBufferBuilder
impl Sync for BooleanBufferBuilder
impl Unpin for BooleanBufferBuilder
impl UnwindSafe for BooleanBufferBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more