Skip to main content

Decode

Trait Decode 

Source
pub trait Decode<C: Copy = ()>: Sized {
    type State<'d>: Materialize<'d, Self>;

    const ORDER: Order;

    // Required methods
    fn fields<'d>() -> &'d [Field<'d>];
    fn start<'d>(document: Document<'d>, context: C) -> Self::State<'d>;
    fn release(&mut self, budget: &mut usize) -> Poll<()>;
}
Expand description

Implemented by generated owned JSON values.

Required Associated Constants§

Required Associated Types§

Source

type State<'d>: Materialize<'d, Self>

Required Methods§

Source

fn fields<'d>() -> &'d [Field<'d>]

Source

fn start<'d>(document: Document<'d>, context: C) -> Self::State<'d>

Source

fn release(&mut self, budget: &mut usize) -> Poll<()>

Retires input-sized collections before this completed value is dropped. Generated implementations visit array elements within the budget. A fixed-schema value’s scalar fields and user-defined Drop are not split.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§