pub struct PrologDCGBuilder { /* private fields */ }Expand description
Fluent builder for DcgRule.
Implementations§
Source§impl PrologDCGBuilder
impl PrologDCGBuilder
Sourcepub fn lhs(lhs: PrologTerm) -> Self
pub fn lhs(lhs: PrologTerm) -> Self
Start a DCG rule with the given LHS nonterminal.
Sourcepub fn nonterminal(self, t: PrologTerm) -> Self
pub fn nonterminal(self, t: PrologTerm) -> Self
Add a nonterminal call.
Sourcepub fn terminals(self, ts: Vec<PrologTerm>) -> Self
pub fn terminals(self, ts: Vec<PrologTerm>) -> Self
Add terminal tokens.
Sourcepub fn guard(self, g: PrologTerm) -> Self
pub fn guard(self, g: PrologTerm) -> Self
Add a Prolog guard {Goals}.
Auto Trait Implementations§
impl Freeze for PrologDCGBuilder
impl RefUnwindSafe for PrologDCGBuilder
impl Send for PrologDCGBuilder
impl Sync for PrologDCGBuilder
impl Unpin for PrologDCGBuilder
impl UnsafeUnpin for PrologDCGBuilder
impl UnwindSafe for PrologDCGBuilder
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