pub enum Regex {
Empty,
Dot,
Literal(char),
Star(Box<Regex>),
Concat(Box<Regex>, Box<Regex>),
Or(Box<Regex>, Box<Regex>),
Plus(Box<Regex>),
Maybe(Box<Regex>),
Not(Box<Regex>),
And(Box<Regex>, Box<Regex>),
}
Expand description
A regular expression.
Variants§
Empty
Matches the empty string.
Dot
Matches any one character.
Literal(char)
Matches a literal character.
Star(Box<Regex>)
Matches zero or more repetitions.
Concat(Box<Regex>, Box<Regex>)
Matches two patterns in a row.
Or(Box<Regex>, Box<Regex>)
Matches either of two patterns.
Plus(Box<Regex>)
Matches one or more repetitions.
Maybe(Box<Regex>)
Matches zero or one times.
Not(Box<Regex>)
Matches the opposite of a pattern.
And(Box<Regex>, Box<Regex>)
Matches the intersection of two patterns.
Implementations§
Trait Implementations§
impl Eq for Regex
impl StructuralPartialEq for Regex
Auto Trait Implementations§
impl Freeze for Regex
impl RefUnwindSafe for Regex
impl Send for Regex
impl Sync for Regex
impl Unpin for Regex
impl UnwindSafe for Regex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more