pub struct DeserializeError(DeserializeErrorKind);Expand description
An error that occurs when deserializing an object defined in this crate.
Serialization, as used in this crate, universally refers to the process
of transforming a structure (like a DFA) into a custom binary format
represented by &[u8]. Deserialization, then, refers to the process of
cheaply converting this binary format back to the object’s in-memory
representation as defined in this crate. To the extent possible,
deserialization will report this error whenever this process fails.
A DeserializeError provides no introspection capabilities. Its only
supported operation is conversion to a human readable error message.
This error type implements the std::error::Error trait only when the
std feature is enabled. Otherwise, this type is defined in all
configurations.
Tuple Fields§
§0: DeserializeErrorKindImplementations§
Source§impl DeserializeError
impl DeserializeError
pub(crate) fn generic(msg: &'static str) -> DeserializeError
pub(crate) fn buffer_too_small(what: &'static str) -> DeserializeError
fn invalid_usize(what: &'static str) -> DeserializeError
fn version_mismatch(expected: u32, found: u32) -> DeserializeError
fn endian_mismatch(expected: u32, found: u32) -> DeserializeError
fn alignment_mismatch(alignment: usize, address: usize) -> DeserializeError
fn label_mismatch(expected: &'static str) -> DeserializeError
fn arithmetic_overflow(what: &'static str) -> DeserializeError
fn pattern_id_error(err: PatternIDError, what: &'static str) -> DeserializeError
pub(crate) fn state_id_error( err: StateIDError, what: &'static str, ) -> DeserializeError
Trait Implementations§
Source§impl Debug for DeserializeError
impl Debug for DeserializeError
Source§impl Display for DeserializeError
impl Display for DeserializeError
Source§impl Error for DeserializeError
Available on crate feature std only.
impl Error for DeserializeError
std only.