Struct pcomb::parse::Empty [−][src]
pub struct Empty;
Expand description
Accepts no input, and produce an empty output.
Empty is infallible: use Parse::map_err to specify an error type.
Trait Implementations
type Err = Infallible
type Output = T
Try to parse part of a slice, returning a tuple of the remainder (the unparsed slice) and the output value. Read more
Maps the output of a parser with a function to produce a new output. Read more
Maps the error of a parser with a function to produce a new error.
Executes the parser if possible, wrapping up the output in an Option. Read more
Parses the output of this parser with an inner parser, and passes the output through. Read more
Takes the union of both combinators, accepting input which passes either parser. Both parsers must output the same type. Read more
Takes the conjunction of both combinators, accepting input which passes both parsers. The remainders of both combinators must be equal, otherwise the specified length error is yielded. Read more
Accepts input which passes this parser first and then other
, packing the
output as a tuple. The remainder of the input is passed to other
. Read more
fn fuse_extend<O>(self, other: O) -> FuseExtend<T, Self, Self::Output, O> where
O: Parse<T, Err = Self::Err>,
Self::Output: Extend<O::Output>,
Self: Sized,
fn fuse_extend<O>(self, other: O) -> FuseExtend<T, Self, Self::Output, O> where
O: Parse<T, Err = Self::Err>,
Self::Output: Extend<O::Output>,
Self: Sized,
Accepts input which passes this parser first and then other
, extending
this output with other
’s output. The remainder of the input is passed
to other
. Read more
Accepts exactly a constant amount of repetitions of this parser, packing the output as a constant array. Read more
fn repeat_greedy<O>(self, default: O) -> RepeatGreedy<T, Self, O> where
T: Clone,
O: Extend<Self::Output>,
Self: Clone + Sized,
fn repeat_greedy<O>(self, default: O) -> RepeatGreedy<T, Self, O> where
T: Clone,
O: Extend<Self::Output>,
Self: Clone + Sized,
Accepts any amount of repetitions of this parser, extending the output into the given collection. Read more
Auto Trait Implementations
impl RefUnwindSafe for Empty
impl UnwindSafe for Empty
Blanket Implementations
Mutably borrows from an owned value. Read more