Type Alias arrow::array::GenericStringBuilder

source ·
pub type GenericStringBuilder<O> = GenericByteBuilder<GenericStringType<O>>;
Expand description

Array builder for GenericStringArray

Values can be appended using GenericByteBuilder::append_value, and nulls with GenericByteBuilder::append_null as normal.

Additionally implements std::fmt::Write with any written data included in the next appended value. This allows use with std::fmt::Display without intermediate allocations

let mut builder = GenericStringBuilder::<i32>::new();

// Write data
write!(builder, "foo").unwrap();
write!(builder, "bar").unwrap();

// Finish value
builder.append_value("baz");

// Write second value
write!(builder, "v2").unwrap();
builder.append_value("");

let array = builder.finish();
assert_eq!(array.value(0), "foobarbaz");
assert_eq!(array.value(1), "v2");

Aliased Type§

struct GenericStringBuilder<O> { /* private fields */ }