pub trait ToDFSchema: Sized {
// Required method
fn to_dfschema(self) -> Result<DFSchema, DataFusionError>;
// Provided method
fn to_dfschema_ref(self) -> Result<Arc<DFSchema>, DataFusionError> { ... }
}
Expand description
Convenience trait to convert Schema like things to DFSchema and DFSchemaRef with fewer keystrokes
Required Methods§
Sourcefn to_dfschema(self) -> Result<DFSchema, DataFusionError>
fn to_dfschema(self) -> Result<DFSchema, DataFusionError>
Attempt to create a DSSchema
Provided Methods§
Sourcefn to_dfschema_ref(self) -> Result<Arc<DFSchema>, DataFusionError>
fn to_dfschema_ref(self) -> Result<Arc<DFSchema>, DataFusionError>
Attempt to create a DSSchemaRef
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.