pub enum Regex<T> {
    Satisfy(Rc<dyn Fn(&T) -> bool>),
    Concat(Box<Regex<T>>, Box<Regex<T>>),
    Group(Box<Regex<T>>),
    Or(Box<Regex<T>>, Box<Regex<T>>),
    ZeroOrOne(Box<Regex<T>>),
    Repeat0(Box<Regex<T>>),
    Repeat1(Box<Regex<T>>),
    RepeatN(Box<Regex<T>>, usize),
    RepeatMinMax(Box<Regex<T>>, usizeOption<usize>),
}

Variants

Satisfy(Rc<dyn Fn(&T) -> bool>)

Like a [character class] in regex. Regex that matches any values that satisfy the given predicate.

Concat(Box<Regex<T>>, Box<Regex<T>>)

Like a RS in regex. Concatenate two regex.

Group(Box<Regex<T>>)

Like a (R) in regex. Grouping regex.

Or(Box<Regex<T>>, Box<Regex<T>>)

Like a R|S in regex. Regex alternation.

ZeroOrOne(Box<Regex<T>>)

Like a ? in regex. Regex zero or one.

Repeat0(Box<Regex<T>>)

Like a * in regex. Regex zero or one.

Repeat1(Box<Regex<T>>)

Like a + in regex. Regex one or more.

RepeatN(Box<Regex<T>>, usize)

Like a {n} in regex. Exactly N-times.

RepeatMinMax(Box<Regex<T>>, usizeOption<usize>)

Like a {n,m} or `{n,} in regex. n or n+1 or .. m times.

Implementations

Like a [character class] in regex. Build regex that matches any value that satisfies the given predicate.

Like a . in regex. Build regex that matches any value.

Like a ? in regex. Build regex that matches underlying regex zero or one times.

Like a + in regex. Build regex that matches underlying regex one or more.

Like a * in regex. Build regex that matches underlying regex zero or more.

Like a {n} in regex. Build regex that matches underlying regex N-times.

Like a {n,} in regex. Build regex that matches underlying regex N-times or more.

Like a {n,m} in regex. Build regex that matches underlying regex n or n + 1 or … or m times.

Like a RS in regex. Build regex that R followd by S.

Like a R|S in regex. Build regex that matches R or S.

Like a (R) in regex. Build regex that R regex in a group.

Build regex that matches given value.

Build regex that matches given value sequence.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.