Struct mockers::ScenarioInternals
source · pub struct ScenarioInternals { /* private fields */ }
Implementations§
source§impl ScenarioInternals
impl ScenarioInternals
pub fn create_mock<T: Mock>(int: &Arc<Mutex<Self>>) -> (T, T::Handle)
pub fn create_mock_with_id<T: Mock>( int: &Arc<Mutex<Self>>, mock_id: usize ) -> (T, T::Handle)
pub fn create_named_mock<T: Mock>( int: &Arc<Mutex<Self>>, name: String ) -> (T, T::Handle)
pub fn create_mock_for<T: ?Sized>(
int: &Arc<Mutex<Self>>
) -> (<&'static T as Mocked>::MockImpl, <<&'static T as Mocked>::MockImpl as Mock>::Handle)where
&'static T: Mocked,
pub fn create_named_mock_for<T: ?Sized>(
int: &Arc<Mutex<Self>>,
name: String
) -> (<&'static T as Mocked>::MockImpl, <<&'static T as Mocked>::MockImpl as Mock>::Handle)where
&'static T: Mocked,
pub fn generate_name_for_class(&mut self, mock_id: usize, class_name: &str)
source§impl ScenarioInternals
impl ScenarioInternals
pub fn verify0<Res>(&mut self, method_data: MethodData) -> impl FnOnce() -> Res
pub fn verify1<Arg0: DebugOnStable, Res>( &mut self, method_data: MethodData, arg0: Arg0 ) -> impl FnOnce() -> Res
pub fn verify2<Arg0: DebugOnStable, Arg1: DebugOnStable, Res>( &mut self, method_data: MethodData, arg0: Arg0, arg1: Arg1 ) -> impl FnOnce() -> Res
pub fn verify3<Arg0: DebugOnStable, Arg1: DebugOnStable, Arg2: DebugOnStable, Res>( &mut self, method_data: MethodData, arg0: Arg0, arg1: Arg1, arg2: Arg2 ) -> impl FnOnce() -> Res
pub fn verify4<Arg0: DebugOnStable, Arg1: DebugOnStable, Arg2: DebugOnStable, Arg3: DebugOnStable, Res>( &mut self, method_data: MethodData, arg0: Arg0, arg1: Arg1, arg2: Arg2, arg3: Arg3 ) -> impl FnOnce() -> Res
pub fn get_mock_name(&self, mock_id: usize) -> &str
Auto Trait Implementations§
impl !RefUnwindSafe for ScenarioInternals
impl Send for ScenarioInternals
impl !Sync for ScenarioInternals
impl Unpin for ScenarioInternals
impl !UnwindSafe for ScenarioInternals
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