pub trait Tuple<'a, C, R, Err> {
// Required methods
fn parse(&mut self, reader: &mut Reader<'a, Err, C>) -> ParserResult<R, Err>;
fn parse_separated<RSep>(
&mut self,
reader: &mut Reader<'a, Err, C>,
separator: impl FnMut(&mut Reader<'a, Err, C>) -> ParserResult<RSep, Err>,
) -> ParserResult<R, Err>;
}Expand description
Helper trait for the tuple() combinator.
Required Methods§
Sourcefn parse(&mut self, reader: &mut Reader<'a, Err, C>) -> ParserResult<R, Err>
fn parse(&mut self, reader: &mut Reader<'a, Err, C>) -> ParserResult<R, Err>
Parses the input and returns a tuple of results of each parser.
Sourcefn parse_separated<RSep>(
&mut self,
reader: &mut Reader<'a, Err, C>,
separator: impl FnMut(&mut Reader<'a, Err, C>) -> ParserResult<RSep, Err>,
) -> ParserResult<R, Err>
fn parse_separated<RSep>( &mut self, reader: &mut Reader<'a, Err, C>, separator: impl FnMut(&mut Reader<'a, Err, C>) -> ParserResult<RSep, Err>, ) -> ParserResult<R, Err>
Parses the input and returns a tuple of results of each parser.
Between each parser separator is executed and its result discarded.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.