Trait Format

Source
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§

Source

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.

Source

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.

Implementors§