pub struct BDAddr { /* private fields */ }
Expand description
Stores the 6 byte address used to identify Bluetooth devices.
Implementations§
source§impl BDAddr
impl BDAddr
sourcepub fn into_inner(self) -> [u8; 6]
pub fn into_inner(self) -> [u8; 6]
Destruct the address into the underlying array.
sourcepub fn is_random_static(&self) -> bool
pub fn is_random_static(&self) -> bool
Check if this address is a randomly generated.
sourcepub fn from_str_delim(s: &str) -> Result<Self, ParseBDAddrError>
pub fn from_str_delim(s: &str) -> Result<Self, ParseBDAddrError>
Parses a Bluetooth address with colons :
as delimiters.
All hex-digits [0-9a-fA-F]
are allowed.
sourcepub fn from_str_no_delim(s: &str) -> Result<Self, ParseBDAddrError>
pub fn from_str_no_delim(s: &str) -> Result<Self, ParseBDAddrError>
Parses a Bluetooth address without delimiters.
All hex-digits [0-9a-fA-F]
are allowed.
sourcepub fn write_no_delim(&self, f: &mut impl Write) -> Result
pub fn write_no_delim(&self, f: &mut impl Write) -> Result
Writes the address without delimiters.
sourcepub fn to_string_no_delim(&self) -> String
pub fn to_string_no_delim(&self) -> String
Create a String
with the address with no delimiters.
For the more common presentation with colons use the to_string()
method.
Trait Implementations§
source§impl From<MacAddress> for BDAddr
impl From<MacAddress> for BDAddr
source§fn from(mac_address: MacAddress) -> Self
fn from(mac_address: MacAddress) -> Self
Converts to this type from the input type.
source§impl Ord for BDAddr
impl Ord for BDAddr
source§impl PartialEq for BDAddr
impl PartialEq for BDAddr
source§impl PartialOrd for BDAddr
impl PartialOrd for BDAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for BDAddr
impl Eq for BDAddr
impl StructuralEq for BDAddr
impl StructuralPartialEq for BDAddr
Auto Trait Implementations§
impl RefUnwindSafe for BDAddr
impl Send for BDAddr
impl Sync for BDAddr
impl Unpin for BDAddr
impl UnwindSafe for BDAddr
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