Enum mocktopus::mocking::MockResult
source · pub enum MockResult<T, O> {
Continue(T),
Return(O),
}
Expand description
Controls mocked function behavior when returned from mock closure
Variants
Continue(T)
Function runs normally as if it was called with given arguments. The arguments are passed inside enum variant as a tuple.
Return(O)
Function returns immediately with a given value. The returned value is passed inside enum variant.
Auto Trait Implementations
impl<T, O> RefUnwindSafe for MockResult<T, O>where
O: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, O> Send for MockResult<T, O>where
O: Send,
T: Send,
impl<T, O> Sync for MockResult<T, O>where
O: Sync,
T: Sync,
impl<T, O> Unpin for MockResult<T, O>where
O: Unpin,
T: Unpin,
impl<T, O> UnwindSafe for MockResult<T, O>where
O: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more