Enum regex_automata::hybrid::StartError
source · #[non_exhaustive]pub enum StartError {
Cache {
err: CacheError,
},
Quit {
byte: u8,
},
UnsupportedAnchored {
mode: Anchored,
},
}
Expand description
An error that can occur when computing the start state for a search.
Computing a start state can fail for a few reasons, either
based on incorrect configuration or even based on whether
the look-behind byte triggers a quit state. Typically
one does not need to handle this error if you’re using
DFA::start_state_forward
(or its reverse counterpart), as that routine automatically converts
StartError
to a MatchError
for you.
This error may be returned by the
DFA::start_state
routine.
This error implements the std::error::Error
trait when the std
feature
is enabled.
This error is marked as non-exhaustive. New variants may be added in a semver compatible release.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Cache
An error that occurs when cache inefficiency has dropped below the configured heuristic thresholds.
Fields
err: CacheError
The underlying cache error that occurred.
Quit
An error that occurs when a starting configuration’s look-behind byte is in this DFA’s quit set.
UnsupportedAnchored
An error that occurs when the caller requests an anchored mode that isn’t supported by the DFA.
Trait Implementations§
source§impl Clone for StartError
impl Clone for StartError
source§fn clone(&self) -> StartError
fn clone(&self) -> StartError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StartError
impl Debug for StartError
source§impl Display for StartError
impl Display for StartError
source§impl Error for StartError
impl Error for StartError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for StartError
impl RefUnwindSafe for StartError
impl Send for StartError
impl Sync for StartError
impl Unpin for StartError
impl UnwindSafe for StartError
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)