pub struct Unimock { /* private fields */ }
Expand description
Unimock’s purpose is to be an implementor of downstream traits via mock objects. A single mock object provides the implementation of a single trait method.
The interaction with these mock objects always happen via the Unimock facade and the traits that it implements.
Implementations
sourceimpl Unimock
impl Unimock
sourcepub fn eval<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, F::Output, F> where
F: MockFn + 'static,
F::Output: Sized,
pub fn eval<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, F::Output, F> where
F: MockFn + 'static,
F::Output: Sized,
Evaluate a MockFn given some inputs, to produce its output.
sourcepub fn eval_borrowed<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, &'s F::Output, F> where
F: MockFn + 'static,
pub fn eval_borrowed<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, &'s F::Output, F> where
F: MockFn + 'static,
Evaluate a MockFn given some inputs, to produce its output, where output is borrowed from self
.
sourcepub fn eval_static_ref<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, &'static F::Output, F> where
F: MockFn + 'static,
pub fn eval_static_ref<'i, 's: 'i, F>(
&'s self,
inputs: <F as MockInputs<'i>>::Inputs
) -> Evaluation<'i, &'static F::Output, F> where
F: MockFn + 'static,
Evaluate a MockFn given some inputs, to produce its output, where output is a static reference to F::Output
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Unimock
impl Send for Unimock
impl Sync for Unimock
impl Unpin for Unimock
impl !UnwindSafe for Unimock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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