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

Variants

Satisfy(Rc<dyn Fn(&T) + 'static>)

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

NotSatisfy(Rc<dyn Fn(&T) + 'static>)

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

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

Like a RS in regex. Concatenate two regex.

Group(Rc<Regex<T>>)

Like a (R) in regex. Numbered capturing group (submatch).

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

Like a R|S in regex. Regex alternation.

ZeroOrOne(Rc<Regex<T>>, bool)

Like a ?, ?? in regex. Regex zero or one.

Repeat0(Rc<Regex<T>>, bool)

Like a *, *? in regex. Regex zero or one.

Repeat1(Rc<Regex<T>>, bool)

Like a +, +? in regex. Regex one or more.

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

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

RepeatMinMax(Rc<Regex<T>>, usizeOption<usize>, bool)

Like a {n,m}, {n,m}? or {n,}, {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 [^character class] in regex. Build regex that matches any value that not 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,}, {n,}? in regex. Build regex that matches underlying regex N-times or more.

Like a {n,m}, {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. Numbered capturing group (submatch).

Build regex that matches given value.

Build regex that matches given value sequence.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.

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

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

Converts the given value to a String. Read more

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.