#[non_exhaustive]pub enum ErrorKind {
Show 38 variants
Message(String),
Io(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),
IntegerOutOfRange,
FloatOutOfRange,
NonFiniteFloat,
InvalidSettingName(String),
InvalidPath(String),
PathTraversal(String),
ArrayElementNotScalar,
TopLevelBraces,
UnterminatedComment,
Include(String),
}Expand description
The specific kind of error underlying an Error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Message(String)
A custom error message from Serde
Io(String)
An I/O error, carrying the underlying error’s message
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
IntegerOutOfRange
Integer value does not fit in the target type
FloatOutOfRange
Float value does not fit in the target type
NonFiniteFloat
Non-finite floats (inf, NaN) cannot be represented in libconfig
InvalidSettingName(String)
Setting name does not match [A-Za-z*][-A-Za-z0-9_*]*
InvalidPath(String)
Path passed to lookup/set/remove is malformed
PathTraversal(String)
A path traversal step failed (wrong container type or missing index)
ArrayElementNotScalar
Arrays may only contain scalar values
TopLevelBraces
Braces around the top level of a configuration are not allowed (grammar: a configuration is a setting list; braces delimit nested groups only)
UnterminatedComment
A /* block comment was never closed with */ (section 2.10
defines block comments as delimited pairs)
Include(String)
Error processing an @include directive