#[non_exhaustive]pub enum Error {
PathNotFound,
PathTooLong,
PathTooShort,
Deserialization(Error),
Serialization(Error),
BadIndex,
PathAbsent,
}Expand description
Errors that can occur when using the Miniconf API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PathNotFound
The provided path wasn’t found in the structure.
Double check the provided path to verify that it’s valid.
PathTooLong
The provided path was valid, but there was trailing data at the end.
Check the end of the path and remove any excess characters.
PathTooShort
The provided path was valid, but did not specify a value fully.
Double check the ending and add the remainder of the path.
Deserialization(Error)
The value provided for configuration could not be deserialized into the proper type.
Check that the serialized data is valid JSON and of the correct type.
Serialization(Error)
The value provided could not be serialized.
Check that the buffer had sufficient space.
BadIndex
When indexing into an array, the index provided was out of bounds.
Check array indices to ensure that bounds for all paths are respected.
PathAbsent
The path does not exist at runtime.
This is the case if a deferred core::option::Option or Option
is None at runtime. PathAbsent takes precedence over PathNotFound
if the path is simultaneously masked by a Option::None at runtime but
would still be non-existent if it weren’t.