pub trait Deserializer<F>: Sendwhere
F: RecFamily,{
// Required method
fn deserialize<'buf>(
&mut self,
raw: &RawPayload<'buf>,
ack: &AckRef,
out: &mut dyn EmitRecord<'buf, <F as RecFamily>::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§
Sourcefn deserialize<'buf>(
&mut self,
raw: &RawPayload<'buf>,
ack: &AckRef,
out: &mut dyn EmitRecord<'buf, <F as RecFamily>::Rec<'buf>>,
) -> Result<(), DeserError>
fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, <F as RecFamily>::Rec<'buf>>, ) -> Result<(), DeserError>
Decode raw, emitting each resulting record with the payload’s
metadata and a clone of ack.
Implementations on Foreign Types§
§impl Deserializer<Owned<Value>> for AvroValueDeserializer
impl Deserializer<Owned<Value>> for AvroValueDeserializer
fn deserialize<'buf>( &mut self, raw: &RawPayload<'buf>, ack: &AckRef, out: &mut dyn EmitRecord<'buf, Value>, ) -> Result<(), DeserError>
§impl<F> Deserializer<F> for AvroFastDeserializer<F>
Available on crate feature fast only.
impl<F> Deserializer<F> for AvroFastDeserializer<F>
Available on crate feature
fast only.