pub async fn add_mocked_component(
        &self,
        moniker: Moniker,
        mock: mock::Mock,
    ) -> Result<(), Error> {
        let mock_id = self
            .realm_builder_proxy
            .set_mock_component(&moniker.to_string())
            .await
            .map_err(RealmError::FailedToUseRealmBuilder)?
            .map_err(|s| RealmError::FailedToSetMock(moniker.clone(), s))?;
        self.mocks_runner.register_mock(mock_id, mock).await;
        Ok(())
    }
/// Adds a new mocked component to the realm. When the component is supposed to run the
/// provided [`Mock`] is called with the component's handles.
Adds a new mocked component to the realm. When the component is supposed to run the
provided [`Mock`] is called with the component's handles.
Adds a new mocked component to the realm . When the component is supposed to run the provided [ ` Mock ` ] is called with the component ' s handles .
pub async fn add_mocked_component(
        &self,
        moniker: Moniker,
        mock: mock::Mock,
    ) -> Result<(), Error> {
        let mock_id = self
            .realm_builder_proxy
            .set_mock_component(&moniker.to_string())
            .await
            .map_err(RealmError::FailedToUseRealmBuilder)?
            .map_err(|s| RealmError::FailedToSetMock(moniker.clone(), s))?;
        self.mocks_runner.register_mock(mock_id, mock).await;
        Ok(())
    }
pub async fn add_mocked_component ( & self , moniker : Moniker , mock : mock :: Mock , ) -> Result < ( ) , Error > { let mock_id = self . realm_builder_proxy . set_mock_component ( & moniker . to_string ( ) ) . await . map_err ( RealmError :: FailedToUseRealmBuilder ) ? . map_err ( | s | RealmError :: FailedToSetMock ( moniker . clone ( ) , s ) ) ? ; self . mocks_runner . register_mock ( mock_id , mock ) . await ; Ok ( ( ) ) }
Adds a new mocked component to the realm.
Adds a new mocked component to the realm .
&self
moniker
Moniker
mock
mock::Mock
&self
moniker
Moniker
mock
mock::Mock