pub trait Format {
// Required methods
fn next<'input, 'facet>(
nd: NextData<'input, 'facet>,
expectation: Expectation,
) -> NextResult<'input, 'facet, Spanned<Outcome<'input>>, Spanned<DeserErrorKind>>;
fn skip<'input, 'facet>(
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>(
nd: NextData<'input, 'facet>,
expectation: Expectation,
) -> NextResult<'input, 'facet, Spanned<Outcome<'input>>, Spanned<DeserErrorKind>>
fn next<'input, 'facet>( 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>(
nd: NextData<'input, 'facet>,
) -> NextResult<'input, 'facet, Span, Spanned<DeserErrorKind>>
fn skip<'input, 'facet>( nd: NextData<'input, 'facet>, ) -> NextResult<'input, 'facet, Span, Spanned<DeserErrorKind>>
Skip the next value; used to ignore an input.
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.