pub struct ScanResult<'a> {
pub modes: u16,
pub frequency_mhz: u16,
pub rssi_dbm: i8,
pub bssid: [u8; 6],
pub ssid: &'a [u8],
}Expand description
One entry of PROP_WIFI_SCAN_RESULTS: an access point the device
heard.
Fields§
§modes: u16The security modes this access point offers, as
SecurityMode::bit flags. No bits set means the device did
not determine them, which a receiver that reads beacon headers
for their addresses has no reason to do.
frequency_mhz: u16Center frequency of the primary 20 MHz channel.
rssi_dbm: i8§bssid: [u8; 6]The key: one item per access point.
ssid: &'a [u8]Empty when no name was reported, whether hidden or unread.
Implementations§
Source§impl<'a> ScanResult<'a>
impl<'a> ScanResult<'a>
Sourcepub const fn modes_known(&self) -> bool
pub const fn modes_known(&self) -> bool
Whether the device determined the offered modes at all.
Sourcepub const fn offers(&self, mode: SecurityMode) -> bool
pub const fn offers(&self, mode: SecurityMode) -> bool
Whether this access point offers mode.
pub fn encode(&self, out: &mut [u8]) -> Result<usize, WifiError>
pub fn decode(bytes: &'a [u8]) -> Result<Self, WifiError>
Trait Implementations§
Source§impl<'a> Clone for ScanResult<'a>
impl<'a> Clone for ScanResult<'a>
Source§fn clone(&self) -> ScanResult<'a>
fn clone(&self) -> ScanResult<'a>
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ScanResult<'a>
impl<'a> Debug for ScanResult<'a>
Source§impl<'a> PartialEq for ScanResult<'a>
impl<'a> PartialEq for ScanResult<'a>
impl<'a> Copy for ScanResult<'a>
impl<'a> Eq for ScanResult<'a>
impl<'a> StructuralPartialEq for ScanResult<'a>
Auto Trait Implementations§
impl<'a> Freeze for ScanResult<'a>
impl<'a> RefUnwindSafe for ScanResult<'a>
impl<'a> Send for ScanResult<'a>
impl<'a> Sync for ScanResult<'a>
impl<'a> Unpin for ScanResult<'a>
impl<'a> UnwindSafe for ScanResult<'a>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)