Struct arrow::array::GenericStringBuilder
source · [−]pub struct GenericStringBuilder<OffsetSize: OffsetSizeTrait> { /* private fields */ }
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 StringBuilder
,
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 StringBuilder
,
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>) -> Result<()>
pub fn append_value(&mut self, value: impl AsRef<str>) -> Result<()>
Appends a string into the builder.
Automatically calls the append
method to delimit the string appended in as a
distinct array element.
sourcepub fn append(&mut self, is_valid: bool) -> Result<()>
pub fn append(&mut self, is_valid: bool) -> Result<()>
Finish the current variable-length list array slot.
sourcepub fn append_null(&mut self) -> Result<()>
pub fn append_null(&mut self) -> Result<()>
Append a null value to the array.
sourcepub fn append_option(&mut self, value: Option<impl AsRef<str>>) -> Result<()>
pub fn append_option(&mut self, value: Option<impl AsRef<str>>) -> Result<()>
Append an Option
value to the array.
sourcepub fn finish(&mut self) -> GenericStringArray<OffsetSize>
pub fn finish(&mut self) -> GenericStringArray<OffsetSize>
Builds the StringArray
and reset this builder.
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