Trait mz_avro::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>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl AvroDecode for I32Decoder

§

type Out = i32

source§

impl AvroDecode for I64Decoder

§

type Out = i64

source§

impl AvroDecode for IsizeDecoder

§

type Out = isize

source§

impl AvroDecode for TrivialDecoder

§

type Out = ()

source§

impl AvroDecode for U64Decoder

§

type Out = u64

source§

impl AvroDecode for UsizeDecoder

§

type Out = usize

source§

impl AvroDecode for ValueDecoder

§

type Out = Value

source§

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

§

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>

§

type Out = T

source§

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

§

type Out = Vec<T>