pub enum LinguistError {
InvalidPath(String),
InvalidRegex {
pattern: String,
error: String,
},
MissingNamedPattern(String),
}Expand description
Errors that can occur during language detection
Variants§
InvalidPath(String)
The provided path is invalid for whatever reason
InvalidRegex
A regex pattern in the heuristics is malformed
MissingNamedPattern(String)
A named pattern referenced in heuristics doesn’t exist
Trait Implementations§
Source§impl Clone for LinguistError
impl Clone for LinguistError
Source§fn clone(&self) -> LinguistError
fn clone(&self) -> LinguistError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinguistError
impl Debug for LinguistError
Source§impl Display for LinguistError
impl Display for LinguistError
Source§impl Error for LinguistError
impl Error for LinguistError
1.30.0 · 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 PartialEq for LinguistError
impl PartialEq for LinguistError
impl StructuralPartialEq for LinguistError
Auto Trait Implementations§
impl Freeze for LinguistError
impl RefUnwindSafe for LinguistError
impl Send for LinguistError
impl Sync for LinguistError
impl Unpin for LinguistError
impl UnsafeUnpin for LinguistError
impl UnwindSafe for LinguistError
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