Enum StartError

#[non_exhaustive]
pub enum StartError

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

Cache { err: CacheError }

An error that occurs when cache inefficiency has dropped below the configured heuristic thresholds.

Quit { byte: u8 }

An error that occurs when a starting configuration's look-behind byte is in this DFA's quit set.

UnsupportedAnchored { mode: Anchored }

An error that occurs when the caller requests an anchored mode that isn't supported by the DFA.

Trait Implementations

impl Clone for StartError

fn clone(&self) -> Self

impl Debug for StartError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Display for StartError

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Error for StartError

fn source(&self) -> Option<&dyn Error + 'static>

Auto Trait Implementations

impl Freeze for StartError

impl RefUnwindSafe for StartError

impl Send for StartError

impl Sync for StartError

impl Unpin for StartError

impl UnsafeUnpin for StartError

impl UnwindSafe for StartError

Blanket Implementations

impl<T> Any for StartError where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for StartError where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for StartError where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for StartError where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for StartError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for StartError where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T> ToString for StartError where T: Display + ?Sized,

fn to_string(&self) -> String

impl<T, U> Into<U> for StartError where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for StartError where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for StartError where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>