pub async fn wait_for_message<T: Clone + Send + Sync + 'static>(
broker: &InMemoryBroker<T>,
topic: &str,
timeout: Duration,
) -> Message<T>Expand description
Wait until at least one message appears on topic or the timeout expires.
Returns the first message on the topic.
ยงPanics
Panics if the timeout elapses before any message arrives.