pub enum LoadError {
Read {
path: PathBuf,
source: Error,
},
Parse {
path: PathBuf,
source: Error,
},
BadRegex {
path: PathBuf,
id: String,
source: Error,
},
BadId {
path: PathBuf,
id: String,
},
DuplicateUserId {
id: String,
first: PathBuf,
second: PathBuf,
},
}Expand description
Hard errors during user-pattern loading.
Variants§
Read
I/O error reading the patterns directory or one of its files.
Parse
TOML deserialisation error in one of the files.
BadRegex
A pattern’s format_regex is malformed.
Fields
BadId
A pattern’s id violates the lowercase-kebab convention or is
empty.
DuplicateUserId
Two user patterns share the same id (across files or within
one file). The user has to disambiguate before the catalogue
can be loaded.
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
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 LoadError
impl !UnwindSafe for LoadError
impl Freeze for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
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