#[non_exhaustive]
pub enum Error {
RecursionTooDeep,
CompiledPatternIsEmpty(String),
DefinitionNotFound(String),
RegexCompilationFailed(String),
GenericCompilationFailure(String),
}
Expand description
Errors that can occur when using this library.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RecursionTooDeep
The recursion while compiling has exhausted the limit.
CompiledPatternIsEmpty(String)
After compiling, the resulting compiled regex pattern is empty.
DefinitionNotFound(String)
A corresponding pattern definition could not be found for the given name.
RegexCompilationFailed(String)
If the compilation for a specific regex in the underlying engine failed.
GenericCompilationFailure(String)
Something is messed up during the compilation phase.
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more