pub struct NetworkInfo {
pub id: Vec<u8, NETWORK_ID_MAX>,
pub connected: bool,
}Expand description
One entry of the Networks attribute (§11.9.5.5’s NetworkInfoStruct).
Two fields, and deliberately no third: §11.9.7.3 keeps credentials out of this list “for security reasons”, so there is nowhere for them to leak to.
Fields§
§id: Vec<u8, NETWORK_ID_MAX>NetworkID [0] — 1 to 32 octets. An SSID, an Extended PAN ID, or an interface name.
connected: boolConnected [1] — “currently linked to the network technology (e.g. Associated for a
Wi-Fi network, media connected for an Ethernet network)”.
Implementations§
Source§impl NetworkInfo
impl NetworkInfo
Sourcepub fn new(id: &[u8]) -> Result<Self, NetworkStatus>
pub fn new(id: &[u8]) -> Result<Self, NetworkStatus>
An entry for id, not connected.
Returns NetworkStatus::OutOfRange for an id outside §11.9.5.5’s 1 to 32 — which
is what §11.9.7.7 calls “Network identifier was invalid (e.g. empty, too long, etc)”.
Trait Implementations§
Source§impl Clone for NetworkInfo
impl Clone for NetworkInfo
Source§impl Debug for NetworkInfo
impl Debug for NetworkInfo
impl Eq for NetworkInfo
Source§impl PartialEq for NetworkInfo
impl PartialEq for NetworkInfo
impl StructuralPartialEq for NetworkInfo
Auto Trait Implementations§
impl Forget for NetworkInfo
impl Freeze for NetworkInfo
impl Move for NetworkInfo
impl RefUnwindSafe for NetworkInfo
impl Send for NetworkInfo
impl Sync for NetworkInfo
impl Unpin for NetworkInfo
impl UnsafeUnpin for NetworkInfo
impl UnwindSafe for NetworkInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more