pub trait TypedRead: Sized {
    type TupleReader<'parent>: ReadTuple
    where
        Self: 'parent
; type StructReader<'parent>: ReadStruct
    where
        Self: 'parent
; type UnionReader: ReadUnion; fn read_union<T: StrictUnion>(
        &mut self,
        inner: impl FnOnce(FieldName, &mut Self::UnionReader) -> Result<T, DecodeError>
    ) -> Result<T, DecodeError>; fn read_enum<T: StrictEnum>(&mut self) -> Result<T, DecodeError>
    where
        u8: From<T>
; fn read_tuple<'parent, 'me, T: StrictTuple>(
        &'me mut self,
        inner: impl FnOnce(&mut Self::TupleReader<'parent>) -> Result<T, DecodeError>
    ) -> Result<T, DecodeError>
    where
        Self: 'parent,
        'me: 'parent
; fn read_struct<'parent, 'me, T: StrictStruct>(
        &'me mut self,
        inner: impl FnOnce(&mut Self::StructReader<'parent>) -> Result<T, DecodeError>
    ) -> Result<T, DecodeError>
    where
        Self: 'parent,
        'me: 'parent
; fn read_newtype<T: StrictTuple + Wrapper>(
        &mut self
    ) -> Result<T, DecodeError>
    where
        T::Inner: StrictDecode
, { ... } }

Required Associated Types§

source

type TupleReader<'parent>: ReadTuple
where
    Self: 'parent

source

type StructReader<'parent>: ReadStruct
where
    Self: 'parent

source

type UnionReader: ReadUnion

Required Methods§

source

fn read_union<T: StrictUnion>(
    &mut self,
    inner: impl FnOnce(FieldName, &mut Self::UnionReader) -> Result<T, DecodeError>
) -> Result<T, DecodeError>

source

fn read_enum<T: StrictEnum>(&mut self) -> Result<T, DecodeError>where
    u8: From<T>,

source

fn read_tuple<'parent, 'me, T: StrictTuple>(
    &'me mut self,
    inner: impl FnOnce(&mut Self::TupleReader<'parent>) -> Result<T, DecodeError>
) -> Result<T, DecodeError>where
    Self: 'parent,
    'me: 'parent,

source

fn read_struct<'parent, 'me, T: StrictStruct>(
    &'me mut self,
    inner: impl FnOnce(&mut Self::StructReader<'parent>) -> Result<T, DecodeError>
) -> Result<T, DecodeError>where
    Self: 'parent,
    'me: 'parent,

Provided Methods§

source

fn read_newtype<T: StrictTuple + Wrapper>(&mut self) -> Result<T, DecodeError>where
    T::Inner: StrictDecode,

Implementors§

source§

impl<R: Read> TypedRead for StrictReader<R>

§

type TupleReader<'parent>
where
    Self: 'parent
= TupleReader<'parent, R>

§

type StructReader<'parent>
where
    Self: 'parent
= StructReader<'parent, R>

§

type UnionReader = StrictReader<R>