Enum bson::DecoderError
[−]
[src]
pub enum DecoderError { IoError(Error), Utf8Error(Utf8Error), UnrecognizedElementType(u8), InvalidArrayKey(usize, String), ExpectedField(&'static str), UnknownField(String), SyntaxError(String), EndOfStream, Unknown(String), }
Possible errors that can arise during decoding.
Variants
IoError(Error)
Utf8Error(Utf8Error)
UnrecognizedElementType(u8)
InvalidArrayKey(usize, String)
ExpectedField(&'static str)
UnknownField(String)
SyntaxError(String)
EndOfStream
Unknown(String)
Trait Implementations
impl Debug for DecoderError
[src]
impl From<Error> for DecoderError
[src]
fn from(err: Error) -> DecoderError
[−]
Performs the conversion.
impl From<Utf8Error> for DecoderError
[src]
fn from(err: Utf8Error) -> DecoderError
[−]
Performs the conversion.
impl From<Error> for DecoderError
[src]
fn from(err: Error) -> DecoderError
[−]
Performs the conversion.
impl Display for DecoderError
[src]
impl Error for DecoderError
[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 Error for DecoderError
[src]
fn custom<T: Into<String>>(msg: T) -> DecoderError
[−]
Raised when there is general error when deserializing a type.
fn invalid_value(msg: &str) -> DecoderError
[−]
Raised when a Deserialize
was passed an incorrect value.
fn end_of_stream() -> DecoderError
[−]
Raised when a Deserialize
type unexpectedly hit the end of the stream.
fn unknown_field(field: &str) -> DecoderError
[−]
Raised when a Deserialize
struct type received an unexpected struct field.
fn missing_field(field: &'static str) -> DecoderError
[−]
raised when a deserialize
struct type did not receive a field.
fn invalid_type(ty: Type) -> Self
[−]
Raised when a Deserialize
was passed an incorrect type.
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 duplicate_field(field: &'static str) -> Self
[−]
Raised when a Deserialize
struct type received more than one of the same struct field. Read more