pub trait Schema<T>:
    Debug
    + Send
    + Sync {
    type ArrowColumn: Array + Debug + Clone + 'static;
    type Statistics: DynStats + 'static;
    type Decoder: ColumnDecoder<T> + Debug + Send + Sync;
    type Encoder: ColumnEncoder<T, FinishedColumn = Self::ArrowColumn> + Debug + Send + Sync;
    // Required methods
    fn decoder(&self, col: Self::ArrowColumn) -> Result<Self::Decoder, Error>;
    fn encoder(&self) -> Result<Self::Encoder, Error>;
    // Provided method
    fn decoder_any(&self, col: &dyn Array) -> Result<Self::Decoder, Error> { ... }
}Expand description
Description of a type that we encode into Persist.
Required Associated Types§
Sourcetype ArrowColumn: Array + Debug + Clone + 'static
 
type ArrowColumn: Array + Debug + Clone + 'static
The type of column we decode from, and encoder will finish into.
Sourcetype Statistics: DynStats + 'static
 
type Statistics: DynStats + 'static
Statistics we collect for a schema of this type.
Sourcetype Decoder: ColumnDecoder<T> + Debug + Send + Sync
 
type Decoder: ColumnDecoder<T> + Debug + Send + Sync
Type that is able to decode values of T from Self::ArrowColumn.
Sourcetype Encoder: ColumnEncoder<T, FinishedColumn = Self::ArrowColumn> + Debug + Send + Sync
 
type Encoder: ColumnEncoder<T, FinishedColumn = Self::ArrowColumn> + Debug + Send + Sync
Type that is able to encoder values of T.
Required Methods§
Provided Methods§
Sourcefn decoder_any(&self, col: &dyn Array) -> Result<Self::Decoder, Error>
 
fn decoder_any(&self, col: &dyn Array) -> Result<Self::Decoder, Error>
Returns a type that is able to decode instances of T from a type erased
arrow::array::Array, erroring if the provided array is not Self::ArrowColumn.