pub struct AsyncMock<R: Send + 'static> { /* private fields */ }Expand description
Expectations for one concrete future type.
Each matching poll returns Ready. Calls are counted when polled, not when
the future is created. Arguments stored inside a future cannot be matched.
Implementations§
Source§impl<R: Send + 'static> AsyncMock<R>
impl<R: Send + 'static> AsyncMock<R>
Sourcepub fn expect(&self) -> AsyncExpectation<R>
pub fn expect(&self) -> AsyncExpectation<R>
Starts an expectation. By default any number of calls is allowed.
Sourcepub fn checkpoint(&self)
pub fn checkpoint(&self)
Checks expectations like Self::verify, then clears them for the next phase.
Auto Trait Implementations§
impl<R> Freeze for AsyncMock<R>
impl<R> RefUnwindSafe for AsyncMock<R>where
Arc<State<AsyncRule<R>>>: RefUnwindSafe,
impl<R> Send for AsyncMock<R>
impl<R> Sync for AsyncMock<R>
impl<R> Unpin for AsyncMock<R>
impl<R> UnsafeUnpin for AsyncMock<R>where
Arc<State<AsyncRule<R>>>: UnsafeUnpin,
impl<R> UnwindSafe for AsyncMock<R>where
Arc<State<AsyncRule<R>>>: 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