[−][src]Struct tower_test::mock::Handle
Handle to the Mock
.
Methods
impl<T, U> Handle<T, U>
[src]
pub fn poll_request(&mut self) -> Poll<Option<(T, SendResponse<U>)>>
[src]
Asynchronously gets the next request
pub async fn next_request<'_>(&'_ mut self) -> Option<(T, SendResponse<U>)>
[src]
Gets the next request.
pub fn allow(&mut self, num: u64)
[src]
Allow a certain number of requests
pub fn send_error<E: Into<Box<dyn Error + Send + Sync>>>(&mut self, e: E)
[src]
Make the next poll_ method error with the given error.
Trait Implementations
Auto Trait Implementations
impl<T, U> !RefUnwindSafe for Handle<T, U>
impl<T, U> Send for Handle<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Sync for Handle<T, U> where
T: Send,
U: Send,
T: Send,
U: Send,
impl<T, U> Unpin for Handle<T, U>
impl<T, U> !UnwindSafe for Handle<T, U>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,