pub trait SchemaExt {
// Required methods
fn from_arrow_schema(
value: &Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>,
) -> Self;
fn get_field(&self, name: &str) -> Option<Field>;
fn try_get_field(&self, name: &str) -> Result<Field, PolarsError>;
fn to_arrow(
&self,
compat_level: CompatLevel,
) -> Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>;
fn iter_fields(&self) -> impl ExactSizeIterator;
fn to_supertype(
&mut self,
other: &Schema<DataType, ()>,
) -> Result<bool, PolarsError>;
fn project_select(&self, select: &Bitmap) -> Self;
fn contains_dtype(&self, dtype: &DataType, recursive: bool) -> bool;
}Required Methods§
fn from_arrow_schema( value: &Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>, ) -> Self
fn get_field(&self, name: &str) -> Option<Field>
fn try_get_field(&self, name: &str) -> Result<Field, PolarsError>
fn to_arrow( &self, compat_level: CompatLevel, ) -> Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>
fn iter_fields(&self) -> impl ExactSizeIterator
fn to_supertype( &mut self, other: &Schema<DataType, ()>, ) -> Result<bool, PolarsError>
Sourcefn project_select(&self, select: &Bitmap) -> Self
fn project_select(&self, select: &Bitmap) -> Self
Select fields using a bitmap.
fn contains_dtype(&self, dtype: &DataType, recursive: bool) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SchemaExt for Schema<DataType, ()>
impl SchemaExt for Schema<DataType, ()>
Source§fn try_get_field(&self, name: &str) -> Result<Field, PolarsError>
fn try_get_field(&self, name: &str) -> Result<Field, PolarsError>
Source§fn to_arrow(
&self,
compat_level: CompatLevel,
) -> Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>
fn to_arrow( &self, compat_level: CompatLevel, ) -> Schema<Field, BTreeMap<PlSmallStr, PlSmallStr>>
Convert self to ArrowSchema by cloning the fields.
Source§fn iter_fields(&self) -> impl ExactSizeIterator
fn iter_fields(&self) -> impl ExactSizeIterator
Source§fn to_supertype(
&mut self,
other: &Schema<DataType, ()>,
) -> Result<bool, PolarsError>
fn to_supertype( &mut self, other: &Schema<DataType, ()>, ) -> Result<bool, PolarsError>
Take another Schema and try to find the supertypes between them.