Struct arrow::array::GenericStringBuilder
source · [−]pub struct GenericStringBuilder<OffsetSize: OffsetSizeTrait> { /* private fields */ }
Expand description
Array builder for GenericStringArray
Implementations
sourceimpl<OffsetSize: OffsetSizeTrait> GenericStringBuilder<OffsetSize>
impl<OffsetSize: OffsetSizeTrait> GenericStringBuilder<OffsetSize>
sourcepub fn new(capacity: usize) -> Self
pub fn new(capacity: usize) -> Self
Creates a new GenericStringBuilder
,
capacity
is the number of bytes of string data to pre-allocate space for in this builder
sourcepub fn with_capacity(item_capacity: usize, data_capacity: usize) -> Self
pub fn with_capacity(item_capacity: usize, data_capacity: usize) -> Self
Creates a new GenericStringBuilder
,
data_capacity
is the number of bytes of string data to pre-allocate space for in this builder
item_capacity
is the number of items to pre-allocate space for in this builder
sourcepub fn append_value(&mut self, value: impl AsRef<str>)
pub fn append_value(&mut self, value: impl AsRef<str>)
Appends a string into the builder.
sourcepub fn append_null(&mut self)
pub fn append_null(&mut self)
Append a null value to the array.
sourcepub fn append_option(&mut self, value: Option<impl AsRef<str>>)
pub fn append_option(&mut self, value: Option<impl AsRef<str>>)
Append an Option
value to the array.
sourcepub fn finish(&mut self) -> GenericStringArray<OffsetSize>
pub fn finish(&mut self) -> GenericStringArray<OffsetSize>
Builds the GenericStringArray
and reset this builder.
sourcepub fn values_slice(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn values_slice(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Returns the current values buffer as a slice
sourcepub fn offsets_slice(&self) -> &[OffsetSize]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn offsets_slice(&self) -> &[OffsetSize]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Returns the current offsets buffer as a slice
Trait Implementations
sourceimpl<OffsetSize: OffsetSizeTrait> ArrayBuilder for GenericStringBuilder<OffsetSize>
impl<OffsetSize: OffsetSizeTrait> ArrayBuilder for GenericStringBuilder<OffsetSize>
sourcefn 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.
sourcefn into_box_any(self: Box<Self>) -> Box<dyn Any>
fn into_box_any(self: Box<Self>) -> Box<dyn Any>
Returns the boxed builder as a box of Any
.
sourceimpl<OffsetSize: Debug + OffsetSizeTrait> Debug for GenericStringBuilder<OffsetSize>
impl<OffsetSize: Debug + OffsetSizeTrait> Debug for GenericStringBuilder<OffsetSize>
Auto Trait Implementations
impl<OffsetSize> RefUnwindSafe for GenericStringBuilder<OffsetSize> where
OffsetSize: RefUnwindSafe,
impl<OffsetSize> Send for GenericStringBuilder<OffsetSize>
impl<OffsetSize> Sync for GenericStringBuilder<OffsetSize>
impl<OffsetSize> Unpin for GenericStringBuilder<OffsetSize> where
OffsetSize: Unpin,
impl<OffsetSize> UnwindSafe for GenericStringBuilder<OffsetSize> where
OffsetSize: UnwindSafe,
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