JsonBodyExt

Trait JsonBodyExt 

Source
pub trait JsonBodyExt: IntoBody {
    // Provided methods
    async fn json<T>(self) -> Result<T, Error>
       where T: DeserializeOwned { ... }
    async fn json_from_buffer<'de, T>(
        self,
        buffer: &'de mut Vec<u8>,
    ) -> Result<T, Error>
       where T: Deserialize<'de> { ... }
}
Expand description

Extension methods for a body for working with JSON.

Provided Methods§

Source

async fn json<T>(self) -> Result<T, Error>

Source

async fn json_from_buffer<'de, T>( self, buffer: &'de mut Vec<u8>, ) -> Result<T, Error>
where T: Deserialize<'de>,

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§

Source§

impl<B> JsonBodyExt for B
where B: IntoBody,