pub async fn wait_for_events(
        &mut self,
        events: EnumSet<WifiEvent>,
        clear_pending: bool,
    ) -> EnumSet<WifiEvent> {
        if clear_pending {
            Self::clear_events(events);
        }
        MultiWifiEventFuture::new(events).await
    }
Wait for one of multiple [`WifiEvent`]s. Returns the events that
occurred while waiting.
esp-wifi/src/wifi/mod.rs