pub struct Fail<I, O>(/* private fields */);
Trait Implementations§
Source§impl<S: Stream<Item = I> + ?Sized, I, O> Parser<S> for Fail<I, O>
impl<S: Stream<Item = I> + ?Sized, I, O> Parser<S> for Fail<I, O>
fn parse_lookahead( &self, _: &mut S, ) -> ParseResult<Option<(Self::Output, Consume)>>
fn parse(&self, stream: &mut S) -> ParseResult<Self::Output>
fn parse_consume(&self, stream: &mut S) -> ParseResult<(Self::Output, Consume)>
Source§impl<I, O> ParserBase for Fail<I, O>
impl<I, O> ParserBase for Fail<I, O>
Source§fn emptiable() -> bool
fn emptiable() -> bool
Whether the parser “usually” accepts the empty sequence. Only used in
emit_expectations
.Source§fn map_once<O, F>(self, f: F) -> Map<O, Self, F>
fn map_once<O, F>(self, f: F) -> Map<O, Self, F>
Converts a semantic value after parsing. Similar to
ParserBase::map
, but accepts FnOnce
closures.Source§fn map_mut<O, F>(self, f: F) -> Map<O, Self, F>
fn map_mut<O, F>(self, f: F) -> Map<O, Self, F>
Converts a semantic value after parsing. Similar to
ParserBase::map
, but accepts FnMut
closures.Source§fn and_then_once<P, F>(self, f: F) -> AndThen<Self, P, F>
fn and_then_once<P, F>(self, f: F) -> AndThen<Self, P, F>
Monadic operator: run another parser
f(x)
after parsing. Similar to
ParserBase::and_then
, but accepts FnOnce
closures.Source§fn and_then_mut<P, F>(self, f: F) -> AndThen<Self, P, F>
fn and_then_mut<P, F>(self, f: F) -> AndThen<Self, P, F>
Monadic operator: run another parser
f(x)
after parsing. Similar to
ParserBase::and_then
, but accepts FnMut
closures.Source§fn and_then<P, F>(self, f: F) -> AndThen<Self, P, F>
fn and_then<P, F>(self, f: F) -> AndThen<Self, P, F>
Monadic operator: run another parser
f(x)
after parsing. Read moreSource§fn concat<P>(self, p: P) -> Concat2<Self, P>
fn concat<P>(self, p: P) -> Concat2<Self, P>
Applicative operator: run another parser
p
after parsing. The result is a pair of the
result of the parsers.Source§impl<S: Stream<Item = I> + ?Sized, I, O> ParserMut<S> for Fail<I, O>
impl<S: Stream<Item = I> + ?Sized, I, O> ParserMut<S> for Fail<I, O>
fn parse_lookahead_mut( &mut self, _: &mut S, ) -> ParseResult<Option<(Self::Output, Consume)>>
fn parse_mut(&mut self, stream: &mut S) -> ParseResult<Self::Output>
fn parse_consume_mut( &mut self, stream: &mut S, ) -> ParseResult<(Self::Output, Consume)>
Source§impl<S: Stream<Item = I> + ?Sized, I, O> ParserOnce<S> for Fail<I, O>
impl<S: Stream<Item = I> + ?Sized, I, O> ParserOnce<S> for Fail<I, O>
fn parse_lookahead_once( self, _: &mut S, ) -> ParseResult<Option<(Self::Output, Consume)>>
fn emit_expectations(&self, _: &mut S)
Auto Trait Implementations§
impl<I, O> Freeze for Fail<I, O>
impl<I, O> RefUnwindSafe for Fail<I, O>
impl<I, O> Send for Fail<I, O>
impl<I, O> Sync for Fail<I, O>
impl<I, O> Unpin for Fail<I, O>
impl<I, O> UnwindSafe for Fail<I, O>
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