pub struct TestResponse {
pub status: StatusCode,
pub headers: HeaderMap,
pub body: Vec<u8>,
}Fields§
§status: StatusCode§headers: HeaderMap§body: Vec<u8>Implementations§
Source§impl TestResponse
impl TestResponse
pub fn json<T: DeserializeOwned>(&self) -> Result<T>
pub fn text(&self) -> String
pub fn assert_status(&self, expected: StatusCode)
Trait Implementations§
Source§impl Clone for TestResponse
impl Clone for TestResponse
Source§fn clone(&self) -> TestResponse
fn clone(&self) -> TestResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TestResponse
impl RefUnwindSafe for TestResponse
impl Send for TestResponse
impl Sync for TestResponse
impl Unpin for TestResponse
impl UnsafeUnpin 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