pub struct Mock<Request, Response, Error> { /* private fields */ }
Expand description
The Mock
tower_async_service::Service
is to be used
in tests to assert that a tower_async_service::Service
wrapped
by a tower_async_layer::Layer
receives the expected requests,
and to send back responses or errors.
You cannot use the Mock
tower_async_service::Service
directly,
but instead use it automatically for any test spawned
using the crate::Builder
and specifically its crate::Builder::test
method.
Trait Implementations§
Auto Trait Implementations§
impl<Request, Response, Error> Freeze for Mock<Request, Response, Error>
impl<Request, Response, Error> !RefUnwindSafe for Mock<Request, Response, Error>
impl<Request, Response, Error> Send for Mock<Request, Response, Error>
impl<Request, Response, Error> Sync for Mock<Request, Response, Error>
impl<Request, Response, Error> Unpin for Mock<Request, Response, Error>
impl<Request, Response, Error> !UnwindSafe for Mock<Request, Response, Error>
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