pub struct SendResponse<T> { /* private fields */ }Expand description
Sends a response (or error) back for a single request received by a Mock.
Returned, paired with the request, by Handle::next_request and
Handle::poll_request (and by the assert_request_eq! macro).
Implementations§
Source§impl<T> SendResponse<T>
impl<T> SendResponse<T>
Sourcepub fn send_response(self, response: T)
pub fn send_response(self, response: T)
Resolve the request’s response future with the given response.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for SendResponse<T>
impl<T> !UnwindSafe for SendResponse<T>
impl<T> Freeze for SendResponse<T>
impl<T> Send for SendResponse<T>where
T: Send,
impl<T> Sync for SendResponse<T>where
T: Send,
impl<T> Unpin for SendResponse<T>
impl<T> UnsafeUnpin for SendResponse<T>
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