Struct arrow_array::builder::GenericByteViewBuilder
source · pub struct GenericByteViewBuilder<T: ByteViewType + ?Sized> { /* private fields */ }
Expand description
A builder for GenericByteViewArray
See Self::append_value
for the allocation strategy
Implementations§
source§impl<T: ByteViewType + ?Sized> GenericByteViewBuilder<T>
impl<T: ByteViewType + ?Sized> GenericByteViewBuilder<T>
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new GenericByteViewBuilder
.
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new GenericByteViewBuilder
with space for capacity
string values.
sourcepub fn with_block_size(self, block_size: u32) -> Self
pub fn with_block_size(self, block_size: u32) -> Self
Override the size of buffers to allocate for holding string data
sourcepub fn append_value(&mut self, value: impl AsRef<T::Native>)
pub fn append_value(&mut self, value: impl AsRef<T::Native>)
Appends a value into the builder
§Panics
Panics if
- String buffer count exceeds
u32::MAX
- String length exceeds
u32::MAX
sourcepub fn append_option(&mut self, value: Option<impl AsRef<T::Native>>)
pub fn append_option(&mut self, value: Option<impl AsRef<T::Native>>)
Append an Option
value into the builder
sourcepub fn append_null(&mut self)
pub fn append_null(&mut self)
Append a null value into the builder
sourcepub fn finish(&mut self) -> GenericByteViewArray<T>
pub fn finish(&mut self) -> GenericByteViewArray<T>
Builds the GenericByteViewArray
and reset this builder
sourcepub fn finish_cloned(&self) -> GenericByteViewArray<T>
pub fn finish_cloned(&self) -> GenericByteViewArray<T>
Builds the GenericByteViewArray
without resetting the builder
Trait Implementations§
source§impl<T: ByteViewType + ?Sized> ArrayBuilder for GenericByteViewBuilder<T>
impl<T: ByteViewType + ?Sized> ArrayBuilder for GenericByteViewBuilder<T>
source§fn finish_cloned(&self) -> ArrayRef
fn finish_cloned(&self) -> ArrayRef
Builds the array without resetting the underlying builder.
source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns the builder as a mutable
Any
reference. Read moresource§impl<T: ByteViewType + ?Sized> Debug for GenericByteViewBuilder<T>
impl<T: ByteViewType + ?Sized> Debug for GenericByteViewBuilder<T>
source§impl<T: ByteViewType + ?Sized> Default for GenericByteViewBuilder<T>
impl<T: ByteViewType + ?Sized> Default for GenericByteViewBuilder<T>
source§impl<T: ByteViewType + ?Sized, V: AsRef<T::Native>> Extend<Option<V>> for GenericByteViewBuilder<T>
impl<T: ByteViewType + ?Sized, V: AsRef<T::Native>> Extend<Option<V>> for GenericByteViewBuilder<T>
source§fn extend<I: IntoIterator<Item = Option<V>>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Option<V>>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl<T> Freeze for GenericByteViewBuilder<T>where
T: ?Sized,
impl<T> RefUnwindSafe for GenericByteViewBuilder<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for GenericByteViewBuilder<T>where
T: ?Sized,
impl<T> Sync for GenericByteViewBuilder<T>where
T: ?Sized,
impl<T> Unpin for GenericByteViewBuilder<T>
impl<T> UnwindSafe for GenericByteViewBuilder<T>where
T: UnwindSafe + ?Sized,
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