pub struct NetworkEntry<'a> {
pub hidden: bool,
pub raw_key: bool,
pub security: SecurityMode,
pub ssid: &'a [u8],
pub credential: &'a [u8],
}Expand description
One entry of PROP_WIFI_NETWORKS: a network the device knows.
Secret-bearing. The reported form stops at the SSID, which is
what Self::encode_reported writes and what Self::decode
yields from a device’s answer, with credential empty.
Fields§
The network hides its SSID.
raw_key: boolcredential is a raw pairwise master key rather than a
passphrase.
security: SecurityMode§ssid: &'a [u8]1 to SSID_MAX_LEN octets. Never empty: an empty selection
means no selection, so an entry with no name could be stored and
never chosen.
credential: &'a [u8]Empty in the reported form, and for the modes that take none.
Implementations§
Source§impl<'a> NetworkEntry<'a>
impl<'a> NetworkEntry<'a>
Sourcepub fn validate(&self) -> Result<(), WifiError>
pub fn validate(&self) -> Result<(), WifiError>
Whether this entry is one a device may be asked to store.
Separate from encoding so that a host can check itself before
transmitting and a device can apply the same rule to what
arrives, answering STATUS_INVALID_ARGUMENT to anything this
rejects. A mode that is well-formed but beyond the hardware is a
different answer, STATUS_UNIMPLEMENTED, and is not decided
here.
Sourcepub fn encode(&self, out: &mut [u8]) -> Result<usize, WifiError>
pub fn encode(&self, out: &mut [u8]) -> Result<usize, WifiError>
Encode the item form, credential included.
Trait Implementations§
Source§impl<'a> Clone for NetworkEntry<'a>
impl<'a> Clone for NetworkEntry<'a>
Source§fn clone(&self) -> NetworkEntry<'a>
fn clone(&self) -> NetworkEntry<'a>
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for NetworkEntry<'a>
impl<'a> Debug for NetworkEntry<'a>
Source§impl<'a> PartialEq for NetworkEntry<'a>
impl<'a> PartialEq for NetworkEntry<'a>
impl<'a> Copy for NetworkEntry<'a>
impl<'a> Eq for NetworkEntry<'a>
impl<'a> StructuralPartialEq for NetworkEntry<'a>
Auto Trait Implementations§
impl<'a> Freeze for NetworkEntry<'a>
impl<'a> RefUnwindSafe for NetworkEntry<'a>
impl<'a> Send for NetworkEntry<'a>
impl<'a> Sync for NetworkEntry<'a>
impl<'a> Unpin for NetworkEntry<'a>
impl<'a> UnwindSafe for NetworkEntry<'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
§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)
clone_to_uninit)