Trait MaxJsonLength

Source
pub trait MaxJsonLength: DeserializeOwned {
    type Args;

    // Required method
    fn max_json_length_at(depth: usize, args: Self::Args) -> usize;

    // Provided method
    fn max_json_length_root(args: Self::Args) -> usize { ... }
}

Required Associated Types§

Required Methods§

Source

fn max_json_length_at(depth: usize, args: Self::Args) -> usize

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl MaxJsonLength for bool

Source§

impl MaxJsonLength for U128

Source§

impl<T> MaxJsonLength for Vec<T>
where T: MaxJsonLength,

Source§

type Args = (usize, <T as MaxJsonLength>::Args)

Source§

fn max_json_length_at( depth: usize, (length, item_args): (usize, T::Args), ) -> usize

Source§

impl<T, const N: usize> MaxJsonLength for [T; N]

Source§

type Args = <T as MaxJsonLength>::Args

Source§

fn max_json_length_at(depth: usize, args: Self::Args) -> usize

Implementors§