pub struct Collect<P, V>(/* private fields */)
where
P: ParserIteratorBase,
V: FromIterator<P::Element>;
Trait Implementations§
Source§impl<S, P, V> Parser<S> for Collect<P, V>
impl<S, P, V> Parser<S> for Collect<P, V>
fn parse_lookahead( &self, stream: &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<P, V> ParserBase for Collect<P, V>
impl<P, V> ParserBase for Collect<P, V>
Source§type Input = <P as ParserIteratorBase>::Input
type Input = <P as ParserIteratorBase>::Input
The input type of the parser.
u8
for byte-eating parsers.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, P, V> ParserMut<S> for Collect<P, V>
impl<S, P, V> ParserMut<S> for Collect<P, V>
fn parse_lookahead_mut( &mut self, stream: &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, P, V> ParserOnce<S> for Collect<P, V>
impl<S, P, V> ParserOnce<S> for Collect<P, V>
fn parse_lookahead_once( self, stream: &mut S, ) -> ParseResult<Option<(Self::Output, Consume)>>
fn emit_expectations(&self, stream: &mut S)
Auto Trait Implementations§
impl<P, V> Freeze for Collect<P, V>where
P: Freeze,
impl<P, V> RefUnwindSafe for Collect<P, V>where
P: RefUnwindSafe,
impl<P, V> Send for Collect<P, V>where
P: Send,
impl<P, V> Sync for Collect<P, V>where
P: Sync,
impl<P, V> Unpin for Collect<P, V>where
P: Unpin,
impl<P, V> UnwindSafe for Collect<P, V>where
P: UnwindSafe,
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