Enum regex_automata::nfa::thompson::error::BuildErrorKind

source ·
enum BuildErrorKind {
    Syntax(Error),
    Captures(GroupInfoError),
    Word(UnicodeWordBoundaryError),
    TooManyPatterns {
        given: usize,
        limit: usize,
    },
    TooManyStates {
        given: usize,
        limit: usize,
    },
    ExceededSizeLimit {
        limit: usize,
    },
    InvalidCaptureIndex {
        index: u32,
    },
    UnsupportedCaptures,
}
Expand description

The kind of error that occurred during the construction of a thompson NFA.

Variants§

§

Syntax(Error)

An error that occurred while parsing a regular expression. Note that this error may be printed over multiple lines, and is generally intended to be end user readable on its own.

§

Captures(GroupInfoError)

An error that occurs if the capturing groups provided to an NFA builder do not satisfy the documented invariants. For example, things like too many groups, missing groups, having the first (zeroth) group be named or duplicate group names within the same pattern.

§

Word(UnicodeWordBoundaryError)

An error that occurs when an NFA contains a Unicode word boundary, but where the crate was compiled without the necessary data for dealing with Unicode word boundaries.

§

TooManyPatterns

An error that occurs if too many patterns were given to the NFA compiler.

Fields

§given: usize

The number of patterns given, which exceeds the limit.

§limit: usize

The limit on the number of patterns.

§

TooManyStates

An error that occurs if too states are produced while building an NFA.

Fields

§given: usize

The minimum number of states that are desired, which exceeds the limit.

§limit: usize

The limit on the number of states.

§

ExceededSizeLimit

An error that occurs when NFA compilation exceeds a configured heap limit.

Fields

§limit: usize

The configured limit, in bytes.

§

InvalidCaptureIndex

An error that occurs when an invalid capture group index is added to the NFA. An “invalid” index can be one that would otherwise overflow a usize on the current target.

Fields

§index: u32

The invalid index that was given.

§

UnsupportedCaptures

An error that occurs when one tries to build a reverse NFA with captures enabled. Currently, this isn’t supported, but we probably should support it at some point.

Trait Implementations§

source§

impl Clone for BuildErrorKind

source§

fn clone(&self) -> BuildErrorKind

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BuildErrorKind

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

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

Performs the conversion.