Struct shs::TestResponse
source · pub struct TestResponse {
pub status: StatusCode,
pub body: Vec<u8>,
pub headers: HashMap<UniCase<String>, String>,
}
Expand description
Response from calling Server::test_request.
Fields§
§status: StatusCode
Response code.
body: Vec<u8>
Response body.
headers: HashMap<UniCase<String>, String>
Response headers.
Implementations§
source§impl TestResponse
impl TestResponse
sourcepub fn json<'a, D: Deserialize<'a>>(&'a self) -> Result<D, Error>
pub fn json<'a, D: Deserialize<'a>>(&'a self) -> Result<D, Error>
Parse the test response body as JSON.
Trait Implementations§
source§impl Clone for TestResponse
impl Clone for TestResponse
source§fn clone(&self) -> TestResponse
fn clone(&self) -> TestResponse
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TestResponse
impl Debug for TestResponse
source§impl PartialEq for TestResponse
impl PartialEq for TestResponse
source§fn eq(&self, other: &TestResponse) -> bool
fn eq(&self, other: &TestResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for TestResponse
impl StructuralPartialEq for TestResponse
Auto Trait Implementations§
impl Freeze for TestResponse
impl RefUnwindSafe for TestResponse
impl Send for TestResponse
impl Sync for TestResponse
impl Unpin for TestResponse
impl UnwindSafe for TestResponse
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more