Enum regex_syntax::ast::Ast [−][src]
An abstract syntax tree for a single regular expression.
An Ast
’s fmt::Display
implementation uses constant stack space and heap
space proportional to the size of the Ast
.
This type defines its own destructor that uses constant stack space and
heap space proportional to the size of the Ast
.
Variants
Empty(Span)
An empty regex that matches everything.
Flags(SetFlags)
A set of flags, e.g., (?is)
.
Literal(Literal)
A single character literal, which includes escape sequences.
Dot(Span)
The “any character” class.
Assertion(Assertion)
A single zero-width assertion.
Class(Class)
A single character class. This includes all forms of character classes
except for .
. e.g., \d
, \pN
, [a-z]
and [[:alpha:]]
.
Repetition(Repetition)
A repetition operator applied to an arbitrary regular expression.
Group(Group)
A grouped regular expression.
Alternation(Alternation)
An alternation of regular expressions.
Concat(Concat)
A concatenation of regular expressions.
Implementations
impl Ast
[src]
pub fn span(&self) -> &Span
[src]
Return the span of this abstract syntax tree.
pub fn is_empty(&self) -> bool
[src]
Return true if and only if this Ast is empty.
Trait Implementations
impl Clone for Ast
[src]
impl Debug for Ast
[src]
impl Display for Ast
[src]
Print a display representation of this Ast.
This does not preserve any of the original whitespace formatting that may have originally been present in the concrete syntax from which this Ast was generated.
This implementation uses constant stack space and heap space proportional
to the size of the Ast
.
impl Drop for Ast
[src]
A custom Drop
impl is used for Ast
such that it uses constant stack
space but heap space proportional to the depth of the Ast
.
impl Eq for Ast
[src]
impl PartialEq<Ast> for Ast
[src]
impl StructuralEq for Ast
[src]
impl StructuralPartialEq for Ast
[src]
Auto Trait Implementations
impl RefUnwindSafe for Ast
impl Send for Ast
impl Sync for Ast
impl Unpin for Ast
impl UnwindSafe for Ast
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,