pub trait LogicalType {
// Required methods
fn dtype(&self) -> &DataType;
fn cast_with_options(
&self,
dtype: &DataType,
options: CastOptions,
) -> PolarsResult<Series>;
// Provided methods
fn get_any_value(&self, _i: usize) -> PolarsResult<AnyValue<'_>> { ... }
unsafe fn get_any_value_unchecked(&self, _i: usize) -> AnyValue<'_> { ... }
fn cast(&self, dtype: &DataType) -> PolarsResult<Series> { ... }
}
Required Methods§
Sourcefn dtype(&self) -> &DataType
fn dtype(&self) -> &DataType
Get data type of ChunkedArray
.
fn cast_with_options( &self, dtype: &DataType, options: CastOptions, ) -> PolarsResult<Series>
Provided Methods§
Sourcefn get_any_value(&self, _i: usize) -> PolarsResult<AnyValue<'_>>
fn get_any_value(&self, _i: usize) -> PolarsResult<AnyValue<'_>>
Gets AnyValue
from LogicalType
Sourceunsafe fn get_any_value_unchecked(&self, _i: usize) -> AnyValue<'_>
unsafe fn get_any_value_unchecked(&self, _i: usize) -> AnyValue<'_>
§Safety
Does not do any bound checks.
fn cast(&self, dtype: &DataType) -> PolarsResult<Series>
Implementors§
impl LogicalType for CategoricalChunked
Available on crate feature
dtype-categorical
only.impl LogicalType for DecimalChunked
Available on crate feature
dtype-decimal
only.