pub fn is_connected(&self) -> Result<bool, WifiError> {
        match crate::wifi::sta_state() {
            crate::wifi::WifiState::StaConnected => Ok(true),
            crate::wifi::WifiState::StaDisconnected => Err(WifiError::Disconnected),
            // FIXME: Should any other enum value trigger an error instead of returning false?
            _ => Ok(false),
        }
    }
Checks if the WiFi controller is connected to an AP.

This function should be called after the `connect` method to verify if
the connection was successful.
esp-wifi/src/wifi/mod.rs