InMemoryResponseExt

Trait InMemoryResponseExt 

Source
pub trait InMemoryResponseExt {
    // Required methods
    fn new(status: StatusCode, headers: HeaderMap, body: InMemoryBody) -> Self;
    fn text(self) -> InMemoryResult<String>;
    fn json<U: DeserializeOwned>(self) -> Result<U>;
    fn bytes(self) -> InMemoryResult<Bytes>;
    fn get_cookie(&self, name: &str) -> Option<&str>;
    fn header(&self, name: &str) -> Option<&str>;
}
Expand description

Attempt to clear sensitive information from the response.

Required Methods§

Source

fn new(status: StatusCode, headers: HeaderMap, body: InMemoryBody) -> Self

Source

fn text(self) -> InMemoryResult<String>

Source

fn json<U: DeserializeOwned>(self) -> Result<U>

Source

fn bytes(self) -> InMemoryResult<Bytes>

Source

fn header(&self, name: &str) -> Option<&str>

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§