pub struct NfaBuilder { /* private fields */ }
Expand description
use NfaBuilder::to_nfa
to get the nfa.
Implementations§
Source§impl NfaBuilder
impl NfaBuilder
pub fn new() -> Self
Sourcepub fn from_ast(&mut self, ast: &AstNode) -> NfaStateNode
pub fn from_ast(&mut self, ast: &AstNode) -> NfaStateNode
build nfa from AST.
Sourcepub fn set_end(&mut self, node: &NfaStateNode, end_num: usize)
pub fn set_end(&mut self, node: &NfaStateNode, end_num: usize)
set the end at the end of Nfa nodes.
Sourcepub fn options(&mut self, nodes: Vec<NfaStateNode>) -> NfaStateNode
pub fn options(&mut self, nodes: Vec<NfaStateNode>) -> NfaStateNode
equal to regex ( node1 | node2 ... )
.
pub fn to_nfa(self, node: NfaStateNode) -> Nfa
pub fn len(&self) -> usize
Auto Trait Implementations§
impl Freeze for NfaBuilder
impl RefUnwindSafe for NfaBuilder
impl Send for NfaBuilder
impl Sync for NfaBuilder
impl Unpin for NfaBuilder
impl UnwindSafe for NfaBuilder
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