pub async fn wait_until(
        &mut self,
        expected_event_type: EventType,
        expected_moniker: AbsoluteMoniker,
    ) -> Option<Event> {
        while let Some(event) = self.next().await {
            let actual_event_type = event.event.payload.type_();
            if expected_moniker == event.event.target_moniker
                && expected_event_type == actual_event_type
            {
                return Some(event);
            }
            event.resume();
        }
        None
    }
/// Waits for an event with a particular EventType against a component with a
/// particular moniker. Ignores all other events.
Waits for an event with a particular EventType against a component with a
particular moniker. Ignores all other events.
Waits for an event with a particular EventType against a component with a particular moniker . Ignores all other events .
pub async fn wait_until(
        &mut self,
        expected_event_type: EventType,
        expected_moniker: AbsoluteMoniker,
    ) -> Option<Event> {
        while let Some(event) = self.next().await {
            let actual_event_type = event.event.payload.type_();
            if expected_moniker == event.event.target_moniker
                && expected_event_type == actual_event_type
            {
                return Some(event);
            }
            event.resume();
        }
        None
    }
pub async fn wait_until ( & mut self , expected_event_type : EventType , expected_moniker : AbsoluteMoniker , ) -> Option < Event > { while let Some ( event ) = self . next ( ) . await { let actual_event_type = event . event . payload . type_ ( ) ; if expected_moniker == event . event . target_moniker && expected_event_type == actual_event_type { return Some ( event ) ; } event . resume ( ) ; } None }
Waits for an event with a particular EventType against a component with a
particular moniker.
Waits for an event with a particular EventType against a component with a particular moniker .
&mut self
expected_event_type
EventType
expected_moniker
AbsoluteMoniker
&mut self
expected_event_type
EventType
expected_moniker
AbsoluteMoniker