pub async fn wait_until(
        &self,
        expected_event_type: EventType,
        expected_moniker: AbsoluteMoniker,
    ) -> Invocation {
        loop {
            let invocation = self.receive().await;
            let actual_event_type = invocation.event.payload.type_();
            if expected_moniker == invocation.event.target_moniker
                && expected_event_type == actual_event_type
            {
                return invocation;
            }
            invocation.resume();
        }
    }
/// Waits for an invocation with a particular EventType against a component with a
/// particular moniker. Ignores all other invocations.
Waits for an invocation with a particular EventType against a component with a
particular moniker. Ignores all other invocations.
Waits for an invocation with a particular EventType against a component with a particular moniker . Ignores all other invocations .
pub async fn wait_until(
        &self,
        expected_event_type: EventType,
        expected_moniker: AbsoluteMoniker,
    ) -> Invocation {
        loop {
            let invocation = self.receive().await;
            let actual_event_type = invocation.event.payload.type_();
            if expected_moniker == invocation.event.target_moniker
                && expected_event_type == actual_event_type
            {
                return invocation;
            }
            invocation.resume();
        }
    }
pub async fn wait_until ( & self , expected_event_type : EventType , expected_moniker : AbsoluteMoniker , ) -> Invocation { loop { let invocation = self . receive ( ) . await ; let actual_event_type = invocation . event . payload . type_ ( ) ; if expected_moniker == invocation . event . target_moniker && expected_event_type == actual_event_type { return invocation ; } invocation . resume ( ) ; } }
Waits for an invocation with a particular EventType against a component with a
particular moniker.
Waits for an invocation with a particular EventType against a component with a particular moniker .
&self
expected_event_type
EventType
expected_moniker
AbsoluteMoniker