[][src]Struct tower_test::mock::Handle

pub struct Handle<T, U> { /* fields omitted */ }

Handle to the Mock.

Implementations

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

impl<T: Debug, U: Debug> Debug for Handle<T, U>[src]

impl<T, U> Drop for Handle<T, U>[src]

Auto Trait Implementations

impl<T, U> !RefUnwindSafe for Handle<T, U>[src]

impl<T, U> Send for Handle<T, U> where
    T: Send,
    U: Send
[src]

impl<T, U> Sync for Handle<T, U> where
    T: Send,
    U: Send
[src]

impl<T, U> Unpin for Handle<T, U>[src]

impl<T, U> !UnwindSafe for Handle<T, U>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.