pub async fn wait_until_framework_capability(
        &self,
        expected_target_moniker: &str,
        expected_capability_id: &str,
        expected_scope_moniker: Option<&str>,
    ) -> Result<RouteCapability, Error> {
        loop {
            let invocation =
                self.wait_until_exact::<RouteCapability>(expected_target_moniker).await?;

            // If the capability ID matches and the capability source is framework
            // with a matching optional scope moniker, then return the invocation.
            if expected_capability_id == invocation.capability_id {
                match &invocation.source {
                    fbreak::CapabilitySource::Framework(fbreak::FrameworkCapability {
                        scope_moniker,
                        ..
                    }) if scope_moniker.as_ref().map(|s| s.as_str()) == expected_scope_moniker => {
                        return Ok(invocation)
                    }
                    _ => {}
                }
            }

            invocation.resume().await?;
        }
    }
/// Waits for a framework capability to be routed matching a particular
/// target moniker, scope moniker and capability. Implicitly resumes all other invocations.
/// Returns the casted type if successful and an error otherwise.
Waits for a framework capability to be routed matching a particular
target moniker, scope moniker and capability. Implicitly resumes all other invocations.
Returns the casted type if successful and an error otherwise.
Waits for a framework capability to be routed matching a particular target moniker scope moniker and capability . Implicitly resumes all other invocations . Returns the casted type if successful and an error otherwise .
pub async fn wait_until_framework_capability(
        &self,
        expected_target_moniker: &str,
        expected_capability_id: &str,
        expected_scope_moniker: Option<&str>,
    ) -> Result<RouteCapability, Error> {
        loop {
            let invocation =
                self.wait_until_exact::<RouteCapability>(expected_target_moniker).await?;
            // If the capability ID matches and the capability source is framework
            // with a matching optional scope moniker, then return the invocation.
            if expected_capability_id == invocation.capability_id {
                match &invocation.source {
                    fbreak::CapabilitySource::Framework(fbreak::FrameworkCapability {
                        scope_moniker,
                        ..
                    }) if scope_moniker.as_ref().map(|s| s.as_str()) == expected_scope_moniker => {
                        return Ok(invocation)
                    }
                    _ => {}
                }
            }
            invocation.resume().await?;
        }
    }
pub async fn wait_until_framework_capability ( & self , expected_target_moniker : & str , expected_capability_id : & str , expected_scope_moniker : Option < & str > , ) -> Result < RouteCapability , Error > { loop { let invocation = self . wait_until_exact :: < RouteCapability > ( expected_target_moniker ) . await ? ; // If the capability ID matches and the capability source is framework // with a matching optional scope moniker, then return the invocation. if expected_capability_id == invocation . capability_id { match & invocation . source { fbreak :: CapabilitySource :: Framework ( fbreak :: FrameworkCapability { scope_moniker , .. } ) if scope_moniker . as_ref ( ) . map ( | s | s . as_str ( ) ) == expected_scope_moniker => { return Ok ( invocation ) } _ => { } } } invocation . resume ( ) . await ? ; } }
Waits for a framework capability to be routed matching a particular
target moniker, scope moniker and capability.
Waits for a framework capability to be routed matching a particular target moniker scope moniker and capability .
&self
expected_target_moniker
&str
expected_capability_id
&str
expected_scope_moniker
Option<&str>