pub enum Error {
Show 27 variants
Message(String),
Eof,
Syntax,
ExpectedBoolean,
ExpectedInteger,
ExpectedFloat,
ExpectedString,
ExpectedArray,
ExpectedArrayComma,
ExpectedArrayEnd,
ExpectedArraySemicolon,
ExpectedList,
ExpectedListComma,
ExpectedListEnd,
ExpectedGroup,
ExpectedEquals,
ExpectedSemicolon,
ExpectedCommaOrSemicolon,
ExpectedGroupEnd,
ExpectedIdentifier,
TrailingCharacters,
HeterogeneousArray,
InvalidEscape,
InvalidNumber,
KeyMustBeAString,
UnitNotSupported,
TypeNotSupported(String),
}Expand description
Errors that can occur when serializing or deserializing libconfig data
Variants§
Message(String)
A custom error message from Serde
Eof
Unexpected end of input
Syntax
Syntax error in the input
ExpectedBoolean
Expected a boolean value
ExpectedInteger
Expected an integer value
ExpectedFloat
Expected a float value
ExpectedString
Expected a string value
ExpectedArray
Expected an array
ExpectedArrayComma
Expected a comma in an array
ExpectedArrayEnd
Expected end of array
ExpectedArraySemicolon
Expected a semicolon after array
ExpectedList
Expected a list
ExpectedListComma
Expected a comma in a list
ExpectedListEnd
Expected end of list
ExpectedGroup
Expected a group (struct)
ExpectedEquals
Expected an equals sign or colon
ExpectedSemicolon
Expected a semicolon
ExpectedCommaOrSemicolon
Expected a comma or semicolon
ExpectedGroupEnd
Expected end of group
ExpectedIdentifier
Expected an identifier
TrailingCharacters
Trailing characters after parsing
HeterogeneousArray
Heterogeneous arrays are not supported
InvalidEscape
Invalid escape sequence
InvalidNumber
Invalid number format
KeyMustBeAString
Maps with non-string keys are not supported
UnitNotSupported
Unit type not supported at top level
TypeNotSupported(String)
Type not supported
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn custom<T: Display>(msg: T) -> Self
fn custom<T: Display>(msg: T) -> Self
Source§fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a type different from what it was
expecting. Read moreSource§fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
Deserialize receives a value of the right type but that
is wrong for some other reason. Read moreSource§fn invalid_length(len: usize, exp: &dyn Expected) -> Self
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
Source§fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
Deserialize enum type received a variant with an
unrecognized name.Source§fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
Deserialize struct type received a field with an
unrecognized name.Source§fn missing_field(field: &'static str) -> Self
fn missing_field(field: &'static str) -> Self
Deserialize struct type expected to receive a required
field with a particular name but that field was not present in the
input.Source§fn duplicate_field(field: &'static str) -> Self
fn duplicate_field(field: &'static str) -> Self
Deserialize struct type received more than one of the
same field.