Skip to main content

Deserializer

Trait Deserializer 

Source
pub trait Deserializer<F: RecFamily>: Send {
    // Required method
    fn deserialize<'buf>(
        &mut self,
        raw: &RawPayload<'buf>,
        ack: &AckRef,
        out: &mut dyn EmitRecord<'buf, F::Rec<'buf>>,
    ) -> Result<(), DeserError>;
}
Expand description

One borrowed payload in, 0..N records out through out.

Dyn-compatible for a concrete family (the only generic on the method is a lifetime). Zero emissions is valid (tombstones, empty envelopes); errors are subject to the stage’s ErrorPolicy.

Required Methods§

Source

fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, F::Rec<'buf>>, ) -> Result<(), DeserError>

Decode raw, emitting each resulting record with the payload’s metadata and a clone of ack.

Implementors§