Trait epserde::deser::DeserializeInner
source · 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§
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>>
Object Safety§
This trait is not object safe.