Struct proclet::OpParserInstance
source · pub struct OpParserInstance<P: PunctExt, F> { /* private fields */ }
Expand description
An instance for doing manual parsing of operators.
Implementations§
source§impl<P: PunctExt, F: MatchOpFn> OpParserInstance<P, F>
impl<P: PunctExt, F: MatchOpFn> OpParserInstance<P, F>
sourcepub fn apply(&mut self, punct: P) -> Option<Result<Op<P::Span>, Error<P::Span>>>
pub fn apply(&mut self, punct: P) -> Option<Result<Op<P::Span>, Error<P::Span>>>
Add a Punct
to the currently accumulating op. This may return a new Op
, or None
if more puncts are needed. If punct
has alone spacing and the accumulated op isn’t
valid, it returns an error. Call OpParserInstance::finish
to finish parsing.
Trait Implementations§
Auto Trait Implementations§
impl<P, F> Freeze for OpParserInstance<P, F>
impl<P, F> RefUnwindSafe for OpParserInstance<P, F>
impl<P, F> Send for OpParserInstance<P, F>
impl<P, F> Sync for OpParserInstance<P, F>
impl<P, F> Unpin for OpParserInstance<P, F>
impl<P, F> UnwindSafe for OpParserInstance<P, F>
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