pub enum TomlExtractError {
FileNotFound(String),
InvalidToml {
file: String,
error: String,
},
FieldNotFound(String),
ArrayIndexOutOfBounds {
path: String,
index: usize,
length: usize,
},
NotAnArray(String),
InvalidArrayIndex(String),
IoError(Error),
JsonError(Error),
NotATable(String),
InvalidFieldPath(String),
InvalidValueType(String),
}Expand description
Error types for TOML extraction and manipulation operations.
Variants§
FileNotFound(String)
The specified file was not found.
InvalidToml
The TOML file contains invalid syntax.
FieldNotFound(String)
The specified field path does not exist in the TOML file.
ArrayIndexOutOfBounds
An array index is out of bounds.
Fields
NotAnArray(String)
The specified value is not an array.
InvalidArrayIndex(String)
The array index is invalid (e.g., non-numeric).
IoError(Error)
An I/O error occurred while reading/writing the file.
JsonError(Error)
An error occurred during JSON serialization/deserialization.
NotATable(String)
The specified value is not a TOML table (dictionary).
InvalidFieldPath(String)
The field path is invalid (e.g., empty segments, invalid syntax).
InvalidValueType(String)
The value type is invalid for the requested operation.
Trait Implementations§
Source§impl Debug for TomlExtractError
impl Debug for TomlExtractError
Source§impl Display for TomlExtractError
impl Display for TomlExtractError
Source§impl Error for TomlExtractError
impl Error for TomlExtractError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for TomlExtractError
impl From<Error> for TomlExtractError
Auto Trait Implementations§
impl Freeze for TomlExtractError
impl !RefUnwindSafe for TomlExtractError
impl Send for TomlExtractError
impl Sync for TomlExtractError
impl Unpin for TomlExtractError
impl !UnwindSafe for TomlExtractError
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