Struct mocker::ClosureMocker [−][src]
Expand description
A built-in Mocker, which takes in a closure that returns a boolean. Useful if you don’t feel like implementing the Mocker trait yourself.
Example of a ClosureMocker which makes all the letters uppercase:
let text = "hello, World!"; let mut mocker = ClosureMocker::new(|| { true }); assert_eq!("HELLO, WORLD!", mock(&text, &mut mocker));
Implementations
impl<T: Fn() -> bool> ClosureMocker<T>
[src]
impl<T: Fn() -> bool> ClosureMocker<T>
[src]Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ClosureMocker<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for ClosureMocker<T> where
T: Send,
T: Send,
impl<T> Sync for ClosureMocker<T> where
T: Sync,
T: Sync,
impl<T> Unpin for ClosureMocker<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for ClosureMocker<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,