pub fn rssi(&self) -> Result<i32, WifiError> {
        if self.mode()?.is_sta() {
            let mut rssi: i32 = 0;
            // Will return ESP_FAIL -1 if called in AP mode.
            esp_wifi_result!(unsafe { esp_wifi_sta_get_rssi(&mut rssi) })?;
            Ok(rssi)
        } else {
            Err(WifiError::Unsupported)
        }
    }
Get the rssi information of AP to which the device is associated with.
The value is obtained from the last beacon.

<div class="warning">

- This API should be called after station connected to AP.
- Use this API only in STA or AP-STA mode.
</div>

# Errors
This function returns [WifiError::Unsupported] if the STA side isn't
running. For example, when configured for AP only.
esp-wifi/src/wifi/mod.rs