/// Creates a new `Mock`. The `mock_fn` must be a function which takes a `MockHandles` struct
/// and returnes a pinned and boxed future. This future will be polled so long as the
/// [`RealmInstance`] this mock is instantiated in is still alive.
///
/// The pinned and boxed future can be constructed using [`Box::pin`] with an asynchronous
/// function or block.
///
/// ```
/// let mock1 = Mock::new(move |m: MockHandles| { Box::pin(some_async_fn(m)) });
/// let mock2 = Mock::new(move |m: MockHandles| { Box::pin(async move {
///     let service_proxy = m.connect_to_service::<SomeServiceMarker>()?;
///     service_proxy.some_function()?;
///     Ok(())
/// })});
/// ```
Creates a new `Mock`. The `mock_fn` must be a function which takes a `MockHandles` struct
and returnes a pinned and boxed future. This future will be polled so long as the
[`RealmInstance`] this mock is instantiated in is still alive.

The pinned and boxed future can be constructed using [`Box::pin`] with an asynchronous
function or block.


Creates a new ` Mock ` . The ` mock_fn ` must be a function which takes a ` MockHandles ` struct and returnes a pinned and boxed future . This future will be polled so long as the [ ` RealmInstance ` ] this mock is instantiated in is still alive . The pinned and boxed future can be constructed using [ ` Box :: pin ` ] with an asynchronous function or block .
pub fn new<M>(mock_fn: M) -> Self
    where
        M: Fn(MockHandles) -> BoxFuture<'static, Result<(), Error>> + Sync + Send + 'static,
    {
        Mock(Arc::new(mock_fn))
    }
pub fn new < M > ( mock_fn : M ) -> Self where M : Fn ( MockHandles ) -> BoxFuture < ' static , Result < ( ) , Error > > + Sync + Send + ' static , { Mock ( Arc :: new ( mock_fn ) ) }
Creates a new `Mock`.
Creates a new ` Mock ` .
mock_fn
M