Enum bincode::serde::DeserializeError
[−]
[src]
pub enum DeserializeError { IoError(IoError), InvalidEncoding(InvalidEncoding), SizeLimit, Serde(Error), }
An error that can be produced during decoding.
If decoding from a Buffer, assume that the buffer has been left in an invalid state.
Variants
IoError(IoError)
If the error stems from the reader that is being used during decoding, that error will be stored and returned here.
InvalidEncoding(InvalidEncoding)
If the bytes in the reader are not decodable because of an invalid
encoding, this error will be returned. This error is only possible
if a stream is corrupted. A stream produced from encode
or encode_into
should never produce an InvalidEncoding error.
SizeLimit
If decoding a message takes more than the provided size limit, this error is returned.
Serde(Error)
Trait Implementations
impl Debug for DeserializeError
[src]
impl Error for DeserializeError
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl From<IoError> for DeserializeError
[src]
fn from(err: IoError) -> DeserializeError
Performs the conversion.
impl From<Error> for DeserializeError
[src]
fn from(err: Error) -> DeserializeError
Performs the conversion.
impl Display for DeserializeError
[src]
impl Error for DeserializeError
[src]
fn custom<T: Into<String>>(desc: T) -> DeserializeError
Raised when there is general error when deserializing a type.
fn end_of_stream() -> DeserializeError
Raised when a Deserialize
type unexpectedly hit the end of the stream.
fn invalid_type(ty: Type) -> Self
Raised when a Deserialize
was passed an incorrect type.
fn invalid_value(msg: &str) -> Self
Raised when a Deserialize
was passed an incorrect value.
fn invalid_length(len: usize) -> Self
Raised when a fixed sized sequence or map was passed in the wrong amount of arguments. Read more
fn unknown_variant(field: &str) -> Self
Raised when a Deserialize
enum type received an unexpected variant.
fn unknown_field(field: &str) -> Self
Raised when a Deserialize
struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> Self
raised when a deserialize
struct type did not receive a field.
fn duplicate_field(field: &'static str) -> Self
Raised when a Deserialize
struct type received more than one of the same struct field. Read more