Trait BatchDeserializer

Source
pub trait BatchDeserializer<T>: Send + Debug {
    // Required methods
    fn digest(&mut self, message: T) -> usize;
    fn next(&mut self) -> Result<DeserializerOutput, ArrowError>;
    fn finish(&mut self);
}
Expand description

Trait defining a scheme for deserializing byte streams into structured data. Implementors of this trait are responsible for converting raw bytes into RecordBatch objects.

Required Methods§

Source

fn digest(&mut self, message: T) -> usize

Feeds a message for deserialization, updating the internal state of this BatchDeserializer. Note that one can call this function multiple times before calling next, which will queue multiple messages for deserialization. Returns the number of bytes consumed.

Source

fn next(&mut self) -> Result<DeserializerOutput, ArrowError>

Attempts to deserialize any pending messages and returns a DeserializerOutput to indicate progress.

Source

fn finish(&mut self)

Informs the deserializer that no more messages will be provided for deserialization.

Implementors§