pub async fn wait_for_fallible_runtime_messages<Success, Failure>(
    is_relevant_success: impl Fn(&Success) -> bool + 'static,
    is_relevant_failure: impl Fn(&Failure) -> bool + 'static
) -> Result<Success, Failure>where
    Success: RuntimeMessage + Clone + 'static,
    Failure: RuntimeMessage + Clone + 'static,
Expand description

Stops execution of this function until one of the given RuntimeMessagesare received. The is_relevant functions are used to filter out messages that are not relevant.

This must be used with .await in either an async fn or an async block.