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

Required Methods§

source

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

source

fn text(self) -> Result<String, Error>

source

fn json<U>(self) -> Result<U, Error>

source

fn bytes(self) -> Result<Bytes, Error>

source

fn sanitize(&mut self)

Attempt to clear sensitive information from the response.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl InMemoryResponseExt for Response<InMemoryBody>

source§

fn sanitize(&mut self)

Attempt to clear sensitive information from the response.

source§

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

source§

fn text(self) -> Result<String, Error>

source§

fn json<U>(self) -> Result<U, Error>

source§

fn bytes(self) -> Result<Bytes, Error>

Implementors§