Enum safe_regex_compiler::parser::NonFinalNode[][src]

pub enum NonFinalNode {
    Escape,
    HexEscape0,
    HexEscape1(u8),
    OpenClass0,
    OpenClassNeg,
    OpenClass(boolVec<ClassItem>),
    OpenByteRange(u8),
    ByteRange(u8u8),
    OpenGroup,
    OpenExtendedGroup,
    OpenNonCapturingGroup,
    OpenAlt(Vec<FinalNode>),
    RepeatMin(String),
    RepeatMax(StringString),
    RepeatToken(StringusizeOption<usize>),
}

AST nodes used internally during parsing.

Variants

Escape
HexEscape0
HexEscape1(u8)
OpenClass0
OpenClassNeg
OpenClass(boolVec<ClassItem>)
OpenByteRange(u8)
ByteRange(u8u8)
OpenGroup
OpenExtendedGroup
OpenNonCapturingGroup
OpenAlt(Vec<FinalNode>)
RepeatMin(String)
RepeatMax(StringString)
RepeatToken(StringusizeOption<usize>)

Implementations

impl NonFinalNode[src]

#[must_use]pub fn reason(&self) -> String[src]

Parsing can fail when a NonFinalNode is not converted into a FinalNode. This function returns an explanation to show to the user.

pub fn unwrap_open_class(self) -> (bool, Vec<ClassItem>)[src]

Returns the contents of this NonFinalNode::OpenClass(..). Panics if this is a different enum variant.

pub fn unwrap_open_alt(self) -> Vec<FinalNode>[src]

Returns the contents of this NonFinalNode::OpenAlt(..). Panics if this is a different enum variant.

pub fn unwrap_repeat_min(self) -> String[src]

Returns the contents of this NonFinalNode::RepeatMin(..). Panics if this is a different enum variant.

pub fn unwrap_repeat_max(self) -> (String, String)[src]

Returns the contents of this NonFinalNode::RepeatMax(..). Panics if this is a different enum variant.

Trait Implementations

impl Clone for NonFinalNode[src]

impl Debug for NonFinalNode[src]

impl PartialEq<NonFinalNode> for NonFinalNode[src]

impl PartialOrd<NonFinalNode> for NonFinalNode[src]

impl StructuralPartialEq for NonFinalNode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.