pub trait Parser<It>{
type Output: Tuple;
// Required method
fn parse(&self, it: It) -> ParseResult<Self::Output, It>;
// Provided methods
fn match_pattern(&self, it: It) -> ParseResult<(), It> { ... }
fn map<ClosureType, ClosureOutput>(
self,
map: ClosureType
) -> MapParser<Self, ClosureType, ClosureOutput, It>
where Self: Sized,
ClosureType: Fn(Self::Output) -> ClosureOutput,
ClosureOutput: Tuple { ... }
fn seq<RhsParser>(self, rhs: RhsParser) -> SeqParser<Self, RhsParser, It>
where Self: Sized,
RhsParser: Parser<It>,
Self::Output: AppendTupleToTuple<<RhsParser as Parser<It>>::Output>,
<Self::Output as AppendTupleToTuple<<RhsParser as Parser<It>>::Output>>::Output: Tuple { ... }
fn or_<RhsParser>(self, rhs: RhsParser) -> OrParser<Self, RhsParser, It>
where Self: Sized,
RhsParser: Parser<It, Output = Self::Output> { ... }
fn repeat<RangeType, Idx>(
self,
range: RangeType
) -> RepeatParser<Self, RangeType, Idx, It>
where Self: Sized,
RangeType: RangeBounds<Idx>,
Idx: PartialOrd + PartialEq + PartialOrd<i32> + PartialEq<i32>,
i32: PartialOrd + PartialEq + PartialOrd<Idx> + PartialEq<Idx>,
Self::Output: VectorOutputSpecialize,
<Self::Output as VectorOutputSpecialize>::Output: Tuple { ... }
fn void_(self) -> VoidParser<Self, It>
where Self: Sized { ... }
fn ref_<'a>(&'a self) -> ReferenceParser<'a, Self, It>
where Self: Sized { ... }
fn boxed<'a>(self) -> BoxedParser<'a, Self::Output, It>
where Self: Sized + 'a { ... }
fn refcelled(self) -> RefCelledParser<Self, It>
where Self: Sized { ... }
fn rced(self) -> RcedParser<Self, It>
where Self: Sized { ... }
}