Skip to main content

FromJson

Trait FromJson 

Source
pub trait FromJson: Sized {
    // Required method
    fn from_json(buf: &[u8]) -> Result<(Self, usize)>;

    // Provided methods
    fn get_token(buf: &[u8]) -> Result<(&str, usize)> { ... }
    fn get_string(buf: &[u8]) -> Result<(String, usize)> { ... }
}

Required Methods§

Source

fn from_json(buf: &[u8]) -> Result<(Self, usize)>

Provided Methods§

Source

fn get_token(buf: &[u8]) -> Result<(&str, usize)>

Source

fn get_string(buf: &[u8]) -> Result<(String, usize)>

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.

Implementors§