Expand description
Deserialization traits and types
Deserialize
is the main deserialization trait, providing methods
Deserialize::deserialize_eps
and Deserialize::deserialize_full
which implement ε-copy and full-copy deserialization, respectively.
The implementation of this trait is based on DeserializeInner
,
which is automatically derived with #[derive(Deserialize)]
.
Re-exports§
pub use helpers::*;
pub use mem_case::*;
pub use read::*;
pub use reader_with_pos::*;
pub use slice_with_pos::*;
Modules§
- Helpers for deserialization.
- No-std support for reading while keeping track of the current position.
Enums§
- Errors that can happen during deserialization.
Traits§
- Main deserialization trait. It is separated from
DeserializeInner
to avoid that the user modify its behavior, and hide internal serialization methods. - A helper trait that makes it possible to implement differently deserialization for
crate::traits::ZeroCopy
andcrate::traits::DeepCopy
types. Seecrate::traits::CopyType
for more information. - Inner trait to implement deserialization of a type. This trait exists to separate the user-facing
Deserialize
trait from the low-level deserialization mechanisms ofDeserializeInner::_deserialize_full_inner
andDeserializeInner::_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 inDeserialize
.
Functions§
- Common header check code for both ε-copy and full-copy deserialization.
Type Aliases§
- A shorthand for the deserialized type associated with a type.