mz_avro::decode

Trait AvroDecode

Source
pub trait AvroDecode: Sized {
    type Out;

Show 13 methods // Required methods fn record<R: AvroRead, A: AvroRecordAccess<R>>( self, _a: &mut A, ) -> Result<Self::Out, AvroError>; fn union_branch<'a, R: AvroRead, D: AvroDeserializer>( self, _idx: usize, _n_variants: usize, _null_variant: Option<usize>, _deserializer: D, _reader: &'a mut R, ) -> Result<Self::Out, AvroError>; fn array<A: AvroArrayAccess>( self, _a: &mut A, ) -> Result<Self::Out, AvroError>; fn map<M: AvroMapAccess>(self, _m: &mut M) -> Result<Self::Out, AvroError>; fn enum_variant( self, _symbol: &str, _idx: usize, ) -> Result<Self::Out, AvroError>; fn scalar(self, _scalar: Scalar) -> Result<Self::Out, AvroError>; fn decimal<'a, R: AvroRead>( self, _precision: usize, _scale: usize, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>; fn bytes<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>; fn string<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a str, R>, ) -> Result<Self::Out, AvroError>; fn json<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a Value, R>, ) -> Result<Self::Out, AvroError>; fn uuid<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>; fn fixed<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>; // Provided method fn map_decoder<T, F: FnMut(Self::Out) -> Result<T, AvroError>>( self, f: F, ) -> MappingDecoder<T, Self::Out, Self, F> { ... }
}

Required Associated Types§

Required Methods§

Source

fn record<R: AvroRead, A: AvroRecordAccess<R>>( self, _a: &mut A, ) -> Result<Self::Out, AvroError>

Source

fn union_branch<'a, R: AvroRead, D: AvroDeserializer>( self, _idx: usize, _n_variants: usize, _null_variant: Option<usize>, _deserializer: D, _reader: &'a mut R, ) -> Result<Self::Out, AvroError>

Source

fn array<A: AvroArrayAccess>(self, _a: &mut A) -> Result<Self::Out, AvroError>

Source

fn map<M: AvroMapAccess>(self, _m: &mut M) -> Result<Self::Out, AvroError>

Source

fn enum_variant( self, _symbol: &str, _idx: usize, ) -> Result<Self::Out, AvroError>

Source

fn scalar(self, _scalar: Scalar) -> Result<Self::Out, AvroError>

Source

fn decimal<'a, R: AvroRead>( self, _precision: usize, _scale: usize, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>

Source

fn bytes<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>

Source

fn string<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a str, R>, ) -> Result<Self::Out, AvroError>

Source

fn json<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a Value, R>, ) -> Result<Self::Out, AvroError>

Source

fn uuid<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>

Source

fn fixed<'a, R: AvroRead>( self, _r: ValueOrReader<'a, &'a [u8], R>, ) -> Result<Self::Out, AvroError>

Provided Methods§

Source

fn map_decoder<T, F: FnMut(Self::Out) -> Result<T, AvroError>>( self, f: F, ) -> MappingDecoder<T, Self::Out, Self, F>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AvroDecode for I32Decoder

Source§

impl AvroDecode for I64Decoder

Source§

impl AvroDecode for IsizeDecoder

Source§

impl AvroDecode for TrivialDecoder

Source§

impl AvroDecode for U64Decoder

Source§

impl AvroDecode for UsizeDecoder

Source§

impl AvroDecode for ValueDecoder

Source§

impl<InnerOut, Inner: AvroDecode<Out = InnerOut>, Ctor: FnMut() -> Inner> AvroDecode for ArrayAsVecDecoder<InnerOut, Inner, Ctor>

Source§

type Out = Vec<InnerOut>

Source§

impl<T, InnerOut, Inner: AvroDecode<Out = InnerOut>, Conv: FnMut(InnerOut) -> Result<T, Error>> AvroDecode for MappingDecoder<T, InnerOut, Inner, Conv>

Source§

type Out = T

Source§

impl<T: AvroDecodable> AvroDecode for DefaultArrayAsVecDecoder<T>

Source§

type Out = Vec<T>