pub struct SchemaDescriptor { /* private fields */ }
Available on crate feature
io_parquet
only.Expand description
A schema descriptor. This encapsulates the top-level schemas for all the columns, as well as all descriptors for all the primitive columns.
Implementations
impl SchemaDescriptor
impl SchemaDescriptor
pub fn new(name: String, fields: Vec<ParquetType, Global>) -> SchemaDescriptor
pub fn new(name: String, fields: Vec<ParquetType, Global>) -> SchemaDescriptor
Creates new schema descriptor from Parquet schema.
pub fn columns(&self) -> &[ColumnDescriptor]
pub fn columns(&self) -> &[ColumnDescriptor]
The ColumnDescriptor
(leafs) of this schema.
Note that, for nested fields, this may contain more entries than the number of fields in the file - e.g. a struct field may have two columns.
pub fn fields(&self) -> &[ParquetType]
pub fn fields(&self) -> &[ParquetType]
The schemas’ fields.
pub fn try_from_message(message: &str) -> Result<SchemaDescriptor, Error>
pub fn try_from_message(message: &str) -> Result<SchemaDescriptor, Error>
Creates a schema from
Trait Implementations
impl Clone for SchemaDescriptor
impl Clone for SchemaDescriptor
fn clone(&self) -> SchemaDescriptor
fn clone(&self) -> SchemaDescriptor
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for SchemaDescriptor
impl Send for SchemaDescriptor
impl Sync for SchemaDescriptor
impl Unpin for SchemaDescriptor
impl UnwindSafe for SchemaDescriptor
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