Struct arrow::array::GenericByteViewBuilder
source · pub struct GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,{ /* private fields */ }
Expand description
A builder for GenericByteViewArray
See Self::append_value
for the allocation strategy
Implementations§
source§impl<T> GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
impl<T> GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
sourcepub fn new() -> GenericByteViewBuilder<T>
pub fn new() -> GenericByteViewBuilder<T>
Creates a new GenericByteViewBuilder
.
sourcepub fn with_capacity(capacity: usize) -> GenericByteViewBuilder<T>
pub fn with_capacity(capacity: usize) -> GenericByteViewBuilder<T>
Creates a new GenericByteViewBuilder
with space for capacity
string values.
sourcepub fn with_block_size(self, block_size: u32) -> GenericByteViewBuilder<T>
pub fn with_block_size(self, block_size: u32) -> GenericByteViewBuilder<T>
Override the size of buffers to allocate for holding string data
sourcepub fn append_value(&mut self, value: impl AsRef<<T as ByteViewType>::Native>)
pub fn append_value(&mut self, value: impl AsRef<<T as ByteViewType>::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 as ByteViewType>::Native>>,
)
pub fn append_option( &mut self, value: Option<impl AsRef<<T as ByteViewType>::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> ArrayBuilder for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
impl<T> ArrayBuilder for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
source§fn finish_cloned(&self) -> Arc<dyn Array>
fn finish_cloned(&self) -> Arc<dyn Array>
Builds the array without resetting the underlying builder.
source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Returns the builder as a non-mutable
Any
reference. Read moresource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Returns the builder as a mutable
Any
reference. Read moresource§fn into_box_any(self: Box<GenericByteViewBuilder<T>>) -> Box<dyn Any>
fn into_box_any(self: Box<GenericByteViewBuilder<T>>) -> Box<dyn Any>
Returns the boxed builder as a box of
Any
.source§impl<T> Debug for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
impl<T> Debug for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
source§impl<T> Default for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
impl<T> Default for GenericByteViewBuilder<T>where
T: ByteViewType + ?Sized,
source§fn default() -> GenericByteViewBuilder<T>
fn default() -> GenericByteViewBuilder<T>
Returns the “default value” for a type. Read more
source§impl<T, V> Extend<Option<V>> for GenericByteViewBuilder<T>
impl<T, V> Extend<Option<V>> for GenericByteViewBuilder<T>
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Option<V>>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Option<V>>,
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