pub struct BDAddr { /* fields omitted */ }
Expand description
Stores the 6 byte address used to identify Bluetooth devices.
Destruct the address into the underlying array.
Check if this address is a randomly generated.
Parses a Bluetooth address with colons :
as delimiters.
All hex-digits [0-9a-fA-F]
are allowed.
Parses a Bluetooth address without delimiters.
All hex-digits [0-9a-fA-F]
are allowed.
Writes the address without delimiters.
Create a String
with the address with no delimiters.
For the more common presentation with colons use the to_string()
method.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Build an address from an array.
address[0]
will be the MSB and address[5]
the LSB.
let addr: BDAddr = [0x2A, 0xCC, 0x00, 0x34, 0xFA, 0x00].into();
assert_eq!("2A:CC:00:34:FA:00", addr.to_string());
Parses a Bluetooth address of the form aa:bb:cc:dd:ee:ff
or of form
aabbccddeeff
.
All hex-digits [0-9a-fA-F]
are allowed.
The associated error which can be returned from parsing.
Formats the value using the given formatter.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
Formats the value using the given formatter.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.