Enum safer_bytes::Error [−][src]
#[non_exhaustive]
pub enum Error {
Truncated(Truncated),
ExtraneousBytes(ExtraneousBytes),
Deserialization(&'static str),
}Expand description
Errors that can occur when deserialising objects from a buffer
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Truncated(Truncated)Tried to read something, but not enough bytes left in the buffer
Tuple Fields of Truncated
0: TruncatedExtraneousBytes(ExtraneousBytes)Called Reader::should_be_exhausted(), but found bytes anyway.
Tuple Fields of ExtraneousBytes
Deserialization(&'static str)An attempt to parse an object failed for some reason related to its contents.
Tuple Fields of Deserialization
0: &'static strTrait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more