pub trait DeserializeInner: Sized {
    type DeserType<'a>;

    // Required methods
    fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>;
    fn _deserialize_eps_inner<'a>(
        backend: &mut SliceWithPos<'a>
    ) -> Result<Self::DeserType<'a>>;
}
Expand description

Inner trait to implement deserialization of a type. This trait exists to separate the user-facing Deserialize trait from the low-level deserialization mechanisms of DeserializeInner::_deserialize_full_inner and DeserializeInner::_deserialize_eps_inner. Moreover, it makes it possible to behave slighly differently at the top of the recursion tree (e.g., to check the endianness marker), and to prevent the user from modifying the methods in Deserialize.

The user should not implement this trait directly, but rather derive it.

Required Associated Types§

source

type DeserType<'a>

The deserialization type associated with this type. It can be retrieved conveniently with the alias DeserType.

Required Methods§

source

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DeserializeInner for bool

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<bool>

§

type DeserType<'a> = bool

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for char

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = char

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for f32

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<f32>

§

type DeserType<'a> = f32

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for f64

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<f64>

§

type DeserType<'a> = f64

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for i8

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<i8>

§

type DeserType<'a> = i8

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for i16

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<i16>

§

type DeserType<'a> = i16

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for i32

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<i32>

§

type DeserType<'a> = i32

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for i64

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<i64>

§

type DeserType<'a> = i64

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for i128

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<i128>

§

type DeserType<'a> = i128

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for isize

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<isize>

§

type DeserType<'a> = isize

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for u8

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<u8>

§

type DeserType<'a> = u8

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for u16

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<u16>

§

type DeserType<'a> = u16

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for u32

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<u32>

§

type DeserType<'a> = u32

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for u64

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<u64>

§

type DeserType<'a> = u64

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for u128

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<u128>

§

type DeserType<'a> = u128

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for ()

source§

fn _deserialize_full_inner(_backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = ()

source§

fn _deserialize_eps_inner<'a>( _backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for usize

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<usize>

§

type DeserType<'a> = usize

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for Box<str>

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = &'a str

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for String

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = &'a str

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl DeserializeInner for NonZeroI8

source§

impl DeserializeInner for NonZeroI16

source§

impl DeserializeInner for NonZeroI32

source§

impl DeserializeInner for NonZeroI64

source§

impl DeserializeInner for NonZeroI128

source§

impl DeserializeInner for NonZeroIsize

source§

impl DeserializeInner for NonZeroU8

source§

impl DeserializeInner for NonZeroU16

source§

impl DeserializeInner for NonZeroU32

source§

impl DeserializeInner for NonZeroU64

source§

impl DeserializeInner for NonZeroU128

source§

impl DeserializeInner for NonZeroUsize

source§

impl<T0: ZeroCopy + TypeHash + ReprHash + 'static, T1: ZeroCopy + TypeHash + ReprHash + 'static, T2: ZeroCopy + TypeHash + ReprHash + 'static, T3: ZeroCopy + TypeHash + ReprHash + 'static, T4: ZeroCopy + TypeHash + ReprHash + 'static, T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T1: ZeroCopy + TypeHash + ReprHash + 'static, T2: ZeroCopy + TypeHash + ReprHash + 'static, T3: ZeroCopy + TypeHash + ReprHash + 'static, T4: ZeroCopy + TypeHash + ReprHash + 'static, T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T2: ZeroCopy + TypeHash + ReprHash + 'static, T3: ZeroCopy + TypeHash + ReprHash + 'static, T4: ZeroCopy + TypeHash + ReprHash + 'static, T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T2, T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T3: ZeroCopy + TypeHash + ReprHash + 'static, T4: ZeroCopy + TypeHash + ReprHash + 'static, T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T3, T4, T5, T6, T7, T8, T9, T10)

source§

impl<T4: ZeroCopy + TypeHash + ReprHash + 'static, T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T4, T5, T6, T7, T8, T9, T10)

source§

impl<T5: ZeroCopy + TypeHash + ReprHash + 'static, T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T5, T6, T7, T8, T9, T10)

§

type DeserType<'a> = &'a (T5, T6, T7, T8, T9, T10)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T6: ZeroCopy + TypeHash + ReprHash + 'static, T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T6, T7, T8, T9, T10)

§

type DeserType<'a> = &'a (T6, T7, T8, T9, T10)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T7: ZeroCopy + TypeHash + ReprHash + 'static, T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T7, T8, T9, T10)

§

type DeserType<'a> = &'a (T7, T8, T9, T10)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T8: ZeroCopy + TypeHash + ReprHash + 'static, T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T8, T9, T10)

§

type DeserType<'a> = &'a (T8, T9, T10)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T9: ZeroCopy + TypeHash + ReprHash + 'static, T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T9, T10)

§

type DeserType<'a> = &'a (T9, T10)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T10: ZeroCopy + TypeHash + ReprHash + 'static> DeserializeInner for (T10,)

§

type DeserType<'a> = &'a (T10,)

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T: CopyType + DeserializeInner + 'static> DeserializeInner for Vec<T>
where Vec<T>: DeserializeHelper<<T as CopyType>::Copy, FullType = Vec<T>>,

§

type DeserType<'a> = <Vec<T> as DeserializeHelper<<T as CopyType>::Copy>>::DeserType<'a>

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<<Vec<T> as DeserializeHelper<<T as CopyType>::Copy>>::DeserType<'a>>

source§

impl<T: CopyType + DeserializeInner + 'static, const N: usize> DeserializeInner for [T; N]
where [T; N]: DeserializeHelper<<T as CopyType>::Copy, FullType = [T; N]>,

source§

impl<T: DeserializeInner + CopyType + 'static> DeserializeInner for Box<[T]>
where Box<[T]>: DeserializeHelper<<T as CopyType>::Copy, FullType = Box<[T]>>,

§

type DeserType<'a> = <Box<[T]> as DeserializeHelper<<T as CopyType>::Copy>>::DeserType<'a>

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<<Box<[T]> as DeserializeHelper<<T as CopyType>::Copy>>::DeserType<'a>>

source§

impl<T: DeserializeInner> DeserializeInner for Option<T>

source§

fn _deserialize_full_inner(backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = Option<<T as DeserializeInner>::DeserType<'a>>

source§

fn _deserialize_eps_inner<'a>( backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

source§

impl<T: ?Sized + TypeHash> DeserializeInner for PhantomData<T>

source§

fn _deserialize_full_inner(_backend: &mut impl ReadWithPos) -> Result<Self>

§

type DeserType<'a> = PhantomData<T>

source§

fn _deserialize_eps_inner<'a>( _backend: &mut SliceWithPos<'a> ) -> Result<Self::DeserType<'a>>

Implementors§