pub struct MockController { /* private fields */ }Expand description
Mock controller for testing
Implementations§
Source§impl MockController
impl MockController
Sourcepub fn record_call(&self, method: &str, args: Vec<String>)
pub fn record_call(&self, method: &str, args: Vec<String>)
Record a method call with arguments
Sourcepub fn method_call_count(&self, method: &str) -> usize
pub fn method_call_count(&self, method: &str) -> usize
Get the number of calls to a specific method
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockController
impl RefUnwindSafe for MockController
impl Send for MockController
impl Sync for MockController
impl Unpin for MockController
impl UnsafeUnpin for MockController
impl UnwindSafe for MockController
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<R, D> DepsPresent<D> for R
Source§impl<T> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging