Trait InMemoryResponseExt

Source
pub trait InMemoryResponseExt {
    // Required methods
    fn new(status: StatusCode, headers: HeaderMap, body: InMemoryBody) -> Self;
    fn text(self) -> Result<String, Error<Response<InMemoryBody>>>;
    fn json<U>(self) -> Result<U, Error>
       where U: DeserializeOwned;
    fn bytes(self) -> Result<Bytes, Error<Response<InMemoryBody>>>;
    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) -> Result<String, Error<Response<InMemoryBody>>>

Source

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

Source

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

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.

Implementations on Foreign Types§

Source§

impl InMemoryResponseExt for Response<InMemoryBody>

Implementors§