pub trait SchemaExt {
// Required methods
fn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>;
fn try_with_column_at(
&self,
index: usize,
field: Field,
) -> Result<Schema, ArrowError>;
fn field_names(&self) -> Vec<&String>;
fn without_column(&self, column_name: &str) -> Schema;
fn to_compact_string(&self, indent: Indentation) -> String;
}
Expand description
Extends the functionality of arrow_schema::Schema.
Required Methods§
Sourcefn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>
fn try_with_column(&self, field: Field) -> Result<Schema, ArrowError>
Create a new Schema
with one extra field.
fn try_with_column_at( &self, index: usize, field: Field, ) -> Result<Schema, ArrowError>
fn field_names(&self) -> Vec<&String>
fn without_column(&self, column_name: &str) -> Schema
Sourcefn to_compact_string(&self, indent: Indentation) -> String
fn to_compact_string(&self, indent: Indentation) -> String
Create a compact string representation of the schema
This is intended for display purposes and not for serialization
Implementations on Foreign Types§
Source§impl SchemaExt for Schema
impl SchemaExt for Schema
Source§fn without_column(&self, column_name: &str) -> Schema
fn without_column(&self, column_name: &str) -> Schema
Project the schema to remove the given column.
This only works on top-level fields right now. If a field does not exist, the schema will be returned as is.