Struct btleplug::api::BDAddr[][src]

pub struct BDAddr { /* fields omitted */ }
Expand description

Stores the 6 byte address used to identify Bluetooth devices.

Implementations

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.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

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

Performs the conversion.

Build an address from an array.

address[0] will be the MSB and address[5] the LSB.

Example

let addr: BDAddr = [0x2A, 0xCC, 0x00, 0x34, 0xFA, 0x00].into();
assert_eq!("2A:CC:00:34:FA:00", addr.to_string());

Performs the conversion.

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.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Formats the value using the given formatter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.