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§
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 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.