pub struct ResponseTester<Response, Error> { /* private fields */ }
Expand description
ResponseTester Helper type for testing the response of a layer’s service.
Implementations§
Source§impl<Response, Error> ResponseTester<Response, Error>
impl<Response, Error> ResponseTester<Response, Error>
Sourcepub fn expect_response(self, expected: Response)
pub fn expect_response(self, expected: Response)
Asserts that the response is equal to the given expected response.
§Panics
Panics if the response is an error or if the response is not equal to the given expected response.
Source§impl<Response, Error> ResponseTester<Response, Error>
impl<Response, Error> ResponseTester<Response, Error>
Sourcepub fn expect_error(self, expected: Error)
pub fn expect_error(self, expected: Error)
Asserts that the response is equal to the given expected error.
§Panics
Panics if the response is not an error or if the error is not equal to the given expected error.
Trait Implementations§
Auto Trait Implementations§
impl<Response, Error> Freeze for ResponseTester<Response, Error>
impl<Response, Error> RefUnwindSafe for ResponseTester<Response, Error>where
Response: RefUnwindSafe,
Error: RefUnwindSafe,
impl<Response, Error> Send for ResponseTester<Response, Error>
impl<Response, Error> Sync for ResponseTester<Response, Error>
impl<Response, Error> Unpin for ResponseTester<Response, Error>
impl<Response, Error> UnwindSafe for ResponseTester<Response, Error>where
Response: UnwindSafe,
Error: UnwindSafe,
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