pub trait Format {
// Required methods
fn next<'input, 'facet>(
&mut self,
nd: NextData<'input, 'facet>,
expectation: Expectation,
) -> NextResult<'input, 'facet, Spanned<Outcome<'input>>, Spanned<DeserErrorKind>>;
fn skip<'input, 'facet>(
&mut self,
nd: NextData<'input, 'facet>,
) -> NextResult<'input, 'facet, Span, Spanned<DeserErrorKind>>;
}Expand description
Trait defining a deserialization format. Provides the next parsing step based on current state and expected input.
Required Methods§
Sourcefn next<'input, 'facet>(
&mut self,
nd: NextData<'input, 'facet>,
expectation: Expectation,
) -> NextResult<'input, 'facet, Spanned<Outcome<'input>>, Spanned<DeserErrorKind>>
fn next<'input, 'facet>( &mut self, nd: NextData<'input, 'facet>, expectation: Expectation, ) -> NextResult<'input, 'facet, Spanned<Outcome<'input>>, Spanned<DeserErrorKind>>
Advance the parser with current state and expectation, producing the next outcome or error.
Sourcefn skip<'input, 'facet>(
&mut self,
nd: NextData<'input, 'facet>,
) -> NextResult<'input, 'facet, Span, Spanned<DeserErrorKind>>
fn skip<'input, 'facet>( &mut self, nd: NextData<'input, 'facet>, ) -> NextResult<'input, 'facet, Span, Spanned<DeserErrorKind>>
Skip the next value; used to ignore an input.