[][src]Struct btle::BTAddress

pub struct BTAddress(pub [u8; 6]);

Bluetooth Address. 6 bytes long.

Implementations

impl BTAddress[src]

pub const LEN: usize[src]

pub const ZEROED: BTAddress[src]

pub fn new(bytes: &[u8]) -> BTAddress[src]

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>[src]

pub fn pack_into(self, bytes: &mut [u8]) -> Result<(), PackError>[src]

pub fn address_type(self) -> AddressType[src]

pub fn private_address_parts(self) -> Option<(u32, u32)>[src]

Returns hash (24-bit) and prand (24-bit) of the resolvable private address. prand includes the address type bits.

Trait Implementations

impl Clone for BTAddress[src]

impl Copy for BTAddress[src]

impl Debug for BTAddress[src]

impl Eq for BTAddress[src]

impl Hash for BTAddress[src]

impl Ord for BTAddress[src]

impl PartialEq<BTAddress> for BTAddress[src]

impl PartialOrd<BTAddress> for BTAddress[src]

impl StructuralEq for BTAddress[src]

impl StructuralPartialEq for BTAddress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.