Enum fuchsia_bluetooth::types::Address
source · pub enum Address {
Public(AddressBytes),
Random(AddressBytes),
}
Expand description
A Bluetooth device address can either be public or private. The controller device address used in BR/EDR (aka BD_ADDR) and LE have the “public” address type. A private address is one that is randomly generated by the controller or the host and can only be used in LE. The identity address can be random (often “static random”) but is not typically considered private.
Some controller procedures depend on knowledge of whether an address is public (i.e. the BD_ADDR assigned to the controller) or randomly assigned by the host. This enum type represents that information.
This type represents a Bluetooth device address. Address
can be converted to/from a FIDL
Bluetooth device address type.
Variants§
Public(AddressBytes)
Random(AddressBytes)
Implementations§
source§impl Address
impl Address
pub fn public_from_str(s: &str) -> Result<Address, Error>
pub fn random_from_str(s: &str) -> Result<Address, Error>
pub fn address_type_string(&self) -> String
pub fn as_hex_string(&self) -> String
pub fn bytes(&self) -> &AddressBytes
Trait Implementations§
source§impl PartialEq<str> for Address
impl PartialEq<str> for Address
Address is comparable with a string-based representation of the address, i.e. Address::Public([6, 5, 4, 3, 2, 1]) == “01:02:03:04:05:06”
source§impl PartialEq for Address
impl PartialEq for Address
source§impl WriteInspect for Address
impl WriteInspect for Address
source§fn write_inspect(&self, writer: &Node, key: impl Into<StringReference>)
fn write_inspect(&self, writer: &Node, key: impl Into<StringReference>)
impl Copy for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)