pub enum SlopError {
InvalidLine(usize, String),
UnclosedList(usize, String),
InvalidKey(String),
Io(Error),
}Expand description
The possible errors returned by the SLOP API.
See also: SlopResult
Variants§
InvalidLine(usize, String)
While parsing, the line was not a valid string KV or list KV starter.
Holds the 0-based index and contents if the line in question. The index is written as 1-based when displayed.
UnclosedList(usize, String)
While parsing, the list KV was never closed.
Holds the 0-based index and contents of the line that starts the KV. The index is written as 1-based when displayed.
InvalidKey(String)
Returned during Slop::insert if the key contains
= or ends in {.
Io(Error)
Wrapper for io::Errors.
Trait Implementations§
Source§impl Error for SlopError
impl Error for SlopError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for SlopError
impl !UnwindSafe for SlopError
impl Freeze for SlopError
impl Send for SlopError
impl Sync for SlopError
impl Unpin for SlopError
impl UnsafeUnpin for SlopError
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