Enum toml::DecodeErrorKind
source · pub enum DecodeErrorKind {
ApplicationError(String),
ExpectedField(Option<&'static str>),
UnknownField,
ExpectedType(&'static str, &'static str),
ExpectedMapKey(usize),
ExpectedMapElement(usize),
NoEnumVariants,
NilTooLong,
SyntaxError,
EndOfStream,
}Expand description
Enumeration of possible errors which can occur while decoding a structure.
Variants§
ApplicationError(String)
An error flagged by the application, e.g. value out of range
ExpectedField(Option<&'static str>)
A field was expected, but none was found.
UnknownField
A field was found, but it was not an expected one.
ExpectedType(&'static str, &'static str)
A field was found, but it had the wrong type.
ExpectedMapKey(usize)
The nth map key was expected, but none was found.
ExpectedMapElement(usize)
The nth map element was expected, but none was found.
NoEnumVariants
An enum decoding was requested, but no variants were supplied
NilTooLong
The unit type was being decoded, but a non-zero length string was found
SyntaxError
There was an error with the syntactical structure of the TOML.
EndOfStream
The end of the TOML input was reached too soon
Trait Implementations§
source§impl Debug for DecodeErrorKind
impl Debug for DecodeErrorKind
source§impl PartialEq for DecodeErrorKind
impl PartialEq for DecodeErrorKind
source§fn eq(&self, other: &DecodeErrorKind) -> bool
fn eq(&self, other: &DecodeErrorKind) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for DecodeErrorKind
Auto Trait Implementations§
impl Freeze for DecodeErrorKind
impl RefUnwindSafe for DecodeErrorKind
impl Send for DecodeErrorKind
impl Sync for DecodeErrorKind
impl Unpin for DecodeErrorKind
impl UnwindSafe for DecodeErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more