pub struct TestResponse { /* private fields */ }Implementations§
Source§impl TestResponse
impl TestResponse
pub fn status(&self) -> StatusCode
pub fn headers(&self) -> &HeaderMap
pub fn text(&self) -> String
Sourcepub fn bytes(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> &[u8] ⓘ
The raw response body — for binary downloads where text() would mangle.
Sourcepub fn json<T: DeserializeOwned>(&self) -> T
pub fn json<T: DeserializeOwned>(&self) -> T
Deserialize the JSON body, with a readable panic on mismatch.
Auto 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