pub enum Atom<T = char, B = ()> {
Boundary(B),
Token(RangeSet<T>),
Repeat(Alternation<T, B>, Repeat),
Capture(CaptureGroupId, Alternation<T, B>),
}Variants§
Boundary(B)
Boundary.
Token(RangeSet<T>)
Token.
Repeat(Alternation<T, B>, Repeat)
Repetition.
Capture(CaptureGroupId, Alternation<T, B>)
Capture group.
Implementations§
Source§impl<T, B> Atom<T, B>
impl<T, B> Atom<T, B>
pub fn alternation(alt: Alternation<T, B>) -> Self
pub fn star(inner: Alternation<T, B>) -> Self
Trait Implementations§
Source§impl<T, B, Q, C> BuildNFA<T, Q, C, CaptureTag> for Atom<T, B>
impl<T, B, Q, C> BuildNFA<T, Q, C, CaptureTag> for Atom<T, B>
fn build_nfa_from<S: StateBuilder<T, Q, C>>( &self, state_builder: &mut S, nfa: &mut NFA<Q, T>, tags: &mut Tags<Q, CaptureTag>, class: &B::Class, ) -> Result<(Q, C::Map<Q>), S::Error>
fn build_nfa<S>(
&self,
state_builder: S,
class: C,
) -> Result<TaggedNFA<Q, T, G>, <S as StateBuilder<T, Q, C>>::Error>where
S: StateBuilder<T, Q, C>,
Source§impl<T, B> From<Atom<T, B>> for Alternation<T, B>
impl<T, B> From<Atom<T, B>> for Alternation<T, B>
Source§impl<T, B> From<Atom<T, B>> for Concatenation<T, B>
impl<T, B> From<Atom<T, B>> for Concatenation<T, B>
Source§impl<T, B> FromIterator<Atom<T, B>> for Concatenation<T, B>
impl<T, B> FromIterator<Atom<T, B>> for Concatenation<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Atom<T, B>where
B: Freeze,
impl<T, B> RefUnwindSafe for Atom<T, B>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for Atom<T, B>
impl<T, B> Sync for Atom<T, B>
impl<T, B> Unpin for Atom<T, B>
impl<T, B> UnwindSafe for Atom<T, B>
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