Struct arrow_schema::SchemaBuilder
source · pub struct SchemaBuilder { /* private fields */ }
Implementations§
source§impl SchemaBuilder
impl SchemaBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty SchemaBuilder
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new empty SchemaBuilder
with space for capacity
fields
sourcepub fn push(&mut self, field: impl Into<FieldRef>)
pub fn push(&mut self, field: impl Into<FieldRef>)
Appends a FieldRef
to this SchemaBuilder
without checking for collision
sourcepub fn try_merge(&mut self, field: &FieldRef) -> Result<(), ArrowError>
pub fn try_merge(&mut self, field: &FieldRef) -> Result<(), ArrowError>
Appends a FieldRef
to this SchemaBuilder
checking for collision
If an existing field exists with the same name, calls Field::try_merge
sourcepub fn finish(self) -> Schema
pub fn finish(self) -> Schema
Consume this SchemaBuilder
yielding the final Schema
Trait Implementations§
source§impl Debug for SchemaBuilder
impl Debug for SchemaBuilder
source§impl Default for SchemaBuilder
impl Default for SchemaBuilder
source§fn default() -> SchemaBuilder
fn default() -> SchemaBuilder
Returns the “default value” for a type. Read more
source§impl Extend<Arc<Field>> for SchemaBuilder
impl Extend<Arc<Field>> for SchemaBuilder
source§fn extend<T: IntoIterator<Item = FieldRef>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = FieldRef>>(&mut self, iter: T)
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
source§impl Extend<Field> for SchemaBuilder
impl Extend<Field> for SchemaBuilder
source§fn extend<T: IntoIterator<Item = Field>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Field>>(&mut self, iter: T)
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