pub trait DataType:
Debug
+ Send
+ Sync {
// Required methods
fn name(&self) -> String;
fn logical_type_id(&self) -> LogicalTypeId;
fn default_value(&self) -> Value;
fn as_arrow_type(&self) -> ArrowDataType;
fn create_mutable_vector(&self, capacity: usize) -> Box<dyn MutableVector>;
fn try_cast(&self, from: Value) -> Option<Value>;
}
Expand description
Data type abstraction.
Required Methods§
Sourcefn logical_type_id(&self) -> LogicalTypeId
fn logical_type_id(&self) -> LogicalTypeId
Returns id of the Logical data type.
Sourcefn default_value(&self) -> Value
fn default_value(&self) -> Value
Returns the default value of this type.
Sourcefn as_arrow_type(&self) -> ArrowDataType
fn as_arrow_type(&self) -> ArrowDataType
Convert this type as [arrow::datatypes::DataType].
Sourcefn create_mutable_vector(&self, capacity: usize) -> Box<dyn MutableVector>
fn create_mutable_vector(&self, capacity: usize) -> Box<dyn MutableVector>
Creates a mutable vector with given capacity
of this type.