StartError in regex_automata::dfa - Rust (original) (raw)


#[non_exhaustive]

pub enum StartError {
    Quit {
        byte: u8,
    },
    UnsupportedAnchored {
        mode: Anchored,
    },
}

Available on crate feature dfa-search and (crate features dfa-search or dfa-onepass) only.

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 Automaton::start_state_forward (or its reverse counterpart), as that routine automatically converts StartError to aMatchError for you.

This error may be returned by the Automaton::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.

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.

§

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

Fields

The quit byte that was found.

§

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

Fields

The anchored mode given that is unsupported.

Source§

Source§

Source§

Source§

Available on crate feature std only.

1.30.0 · Source§

Returns the lower-level source of this error, if any. Read more

1.0.0 · Source§

👎Deprecated since 1.42.0: use the Display impl or to_string()

1.0.0 · Source§

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting

Source§

🔬This is a nightly-only experimental API. (error_generic_member_access)

Provides type-based access to context intended for error reports. Read more

§

§

§

§

§

§