Struct strict_encoding::StrictReader
source · pub struct StrictReader<R: Read>(/* private fields */);
Implementations§
source§impl StrictReader<ReadCounter>
impl StrictReader<ReadCounter>
Trait Implementations§
source§impl<R: Clone + Read> Clone for StrictReader<R>
impl<R: Clone + Read> Clone for StrictReader<R>
source§fn clone(&self) -> StrictReader<R>
fn clone(&self) -> StrictReader<R>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<R: Read> ReadUnion for StrictReader<R>
impl<R: Read> ReadUnion for StrictReader<R>
type TupleReader<'parent> = TupleReader<'parent, R> where Self: 'parent
type StructReader<'parent> = StructReader<'parent, R> where Self: 'parent
fn read_tuple<'parent, 'me, T: StrictSum>(
&'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: StrictSum>(
&'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: StrictSum + From<I>, I: StrictDecode>( &mut self ) -> Result<T, DecodeError>
source§impl<R: Read> TypedRead for StrictReader<R>
impl<R: Read> TypedRead for StrictReader<R>
type TupleReader<'parent> = TupleReader<'parent, R> where Self: 'parent
type StructReader<'parent> = StructReader<'parent, R> where Self: 'parent
type UnionReader = StrictReader<R>
fn read_union<T: StrictUnion>( &mut self, inner: impl FnOnce(VariantName, &mut Self::UnionReader) -> Result<T, DecodeError> ) -> Result<T, DecodeError>
fn read_enum<T: StrictEnum>(&mut self) -> Result<T, DecodeError>
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,
Auto Trait Implementations§
impl<R> RefUnwindSafe for StrictReader<R>where
R: RefUnwindSafe,
impl<R> Send for StrictReader<R>where
R: Send,
impl<R> Sync for StrictReader<R>where
R: Sync,
impl<R> Unpin for StrictReader<R>where
R: Unpin,
impl<R> UnwindSafe for StrictReader<R>where
R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more