[][src]Struct sana_core::Rule

pub struct Rule<T> {
    pub regex: Regex,
    pub priority: usize,
    pub action: T,

A lexer rule

It usually corresponds to a token


regex: Regexpriority: usizeaction: T


impl<T: Clone> Rule<T>[src]

pub fn construct_dfa(&self) -> Automata<T>[src]

Construct DFA using regular expression derivatives

Trait Implementations

impl<T: Clone> Clone for Rule<T>[src]

impl<T: Debug> Debug for Rule<T>[src]

impl<T: PartialEq> PartialEq<Rule<T>> for Rule<T>[src]

impl<T> StructuralPartialEq for Rule<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Rule<T> where
    T: RefUnwindSafe

impl<T> Send for Rule<T> where
    T: Send

impl<T> Sync for Rule<T> where
    T: Sync

impl<T> Unpin for Rule<T> where
    T: Unpin

impl<T> UnwindSafe for Rule<T> where
    T: UnwindSafe

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.