pub struct BTAddress(pub [u8; 6]);Expand description
Bluetooth Address. 6 bytes long.
Tuple Fields§
§0: [u8; 6]Implementations§
Source§impl BTAddress
impl BTAddress
pub const LEN: usize = BT_ADDRESS_LEN
pub const ZEROED: BTAddress
Sourcepub fn new(bytes: &[u8]) -> BTAddress
pub fn new(bytes: &[u8]) -> BTAddress
Creates a new ‘BTAddress’ from a byte slice.
§Panics
Panics if bytes.len() != BT_ADDRESS_LEN (6 bytes).
pub fn unpack_from(bytes: &[u8]) -> Result<Self, PackError>
pub fn pack_into(self, bytes: &mut [u8]) -> Result<(), PackError>
pub fn address_type(self) -> AddressType
Sourcepub fn private_address_parts(self) -> Option<(u32, u32)>
pub fn private_address_parts(self) -> Option<(u32, u32)>
Returns hash (24-bit) and prand (24-bit) of the resolvable private address.
prand includes the address type bits.
Trait Implementations§
Source§impl Ord for BTAddress
impl Ord for BTAddress
Source§impl PartialOrd for BTAddress
impl PartialOrd for BTAddress
impl Copy for BTAddress
impl Eq for BTAddress
impl StructuralPartialEq for BTAddress
Auto Trait Implementations§
impl Freeze for BTAddress
impl RefUnwindSafe for BTAddress
impl Send for BTAddress
impl Sync for BTAddress
impl Unpin for BTAddress
impl UnsafeUnpin for BTAddress
impl UnwindSafe for BTAddress
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