#[non_exhaustive]pub struct WifiConfig { /* private fields */ }Expand description
A parsed WiFi configuration recovered from a WIFI: QR payload.
#[non_exhaustive]: fields may grow in 1.x without a breaking change;
construct via WifiConfig::parse and read via the accessors.
Implementations§
Source§impl WifiConfig
impl WifiConfig
Sourcepub fn parse(s: &str) -> Result<Self, ParseError>
pub fn parse(s: &str) -> Result<Self, ParseError>
Parses a WIFI: QR payload into a WifiConfig.
Fields may appear in any order; the WIFI: prefix is required. The SSID
(S:) field is mandatory; all others are optional.
§Errors
Returns ParseError::InvalidFormat if the WIFI: prefix is missing,
or ParseError::MissingField if the SSID field is absent.
Sourcepub fn security(&self) -> WifiSecurity
pub fn security(&self) -> WifiSecurity
The authentication mode.
Whether the network is hidden (H:true).
Trait Implementations§
Source§impl Clone for WifiConfig
impl Clone for WifiConfig
Source§fn clone(&self) -> WifiConfig
fn clone(&self) -> WifiConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WifiConfig
impl Debug for WifiConfig
impl Eq for WifiConfig
Source§impl PartialEq for WifiConfig
impl PartialEq for WifiConfig
impl StructuralPartialEq for WifiConfig
Auto Trait Implementations§
impl Freeze for WifiConfig
impl RefUnwindSafe for WifiConfig
impl Send for WifiConfig
impl Sync for WifiConfig
impl Unpin for WifiConfig
impl UnsafeUnpin for WifiConfig
impl UnwindSafe for WifiConfig
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