Struct regex_automata::meta::error::RetryFailError
source · pub(crate) struct RetryFailError {
offset: usize,
}
Expand description
An error that occurs when a regex engine “gives up” for some reason before finishing a search. Usually this occurs because of heuristic Unicode word boundary support or because of ineffective cache usage in the lazy DFA.
When this error occurs, callers should retry the regex search with a different regex engine.
Note that this has convenient From
impls that will automatically
convert a MatchError
into this error. This works because the meta
regex engine internals guarantee that errors like HaystackTooLong
and
UnsupportedAnchored
will never occur. The only errors left are Quit
and
GaveUp
, which both correspond to this “failure” error.
Fields§
§offset: usize
Implementations§
source§impl RetryFailError
impl RetryFailError
pub(crate) fn from_offset(offset: usize) -> RetryFailError
Trait Implementations§
source§impl Debug for RetryFailError
impl Debug for RetryFailError
source§impl Display for RetryFailError
impl Display for RetryFailError
source§impl Error for RetryFailError
impl Error for RetryFailError
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 From<MatchError> for RetryFailError
impl From<MatchError> for RetryFailError
source§fn from(merr: MatchError) -> RetryFailError
fn from(merr: MatchError) -> RetryFailError
Converts to this type from the input type.
source§impl From<RetryFailError> for RetryError
impl From<RetryFailError> for RetryError
source§fn from(err: RetryFailError) -> RetryError
fn from(err: RetryFailError) -> RetryError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RetryFailError
impl RefUnwindSafe for RetryFailError
impl Send for RetryFailError
impl Sync for RetryFailError
impl Unpin for RetryFailError
impl UnwindSafe for RetryFailError
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