pub struct Bssid(/* private fields */);Expand description
A BSSID (access-point MAC address).
wpa_supplicant expects the bssid field raw and unquoted (a quoted MAC
fails to parse). Parsing up front and re-emitting the canonical
xx:xx:xx:xx:xx:xx form via Display means caller input is never echoed
into an unquoted command position.
use wifi_ctrl::sta::Bssid;
let bssid: Bssid = "CC:7B:5C:1A:D2:21".parse()?;
// Always re-emitted in canonical lowercase form.
assert_eq!(bssid.to_string(), "cc:7b:5c:1a:d2:21");
assert_eq!(bssid, Bssid::from([0xcc, 0x7b, 0x5c, 0x1a, 0xd2, 0x21]));
assert!("cc:7b:5c:1a:d2".parse::<Bssid>().is_err());Trait Implementations§
impl Copy for Bssid
impl Eq for Bssid
impl StructuralPartialEq for Bssid
Auto Trait Implementations§
impl Freeze for Bssid
impl RefUnwindSafe for Bssid
impl Send for Bssid
impl Sync for Bssid
impl Unpin for Bssid
impl UnsafeUnpin for Bssid
impl UnwindSafe for Bssid
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