pub(crate) async fn expect_event<E>( rx: Receiver<E>, evt: E::EventType, timeout: u32, ) -> Result<E, Error>where E: IsEvent + Send + Sync + 'static, <E as IsEvent>::EventType: Send + Sync,