MCPcopy Create free account
hub / github.com/deviceplug/btleplug / from

Method from

src/api/bdaddr.rs:74–76  ·  view source on GitHub ↗

Build an address from an array. `address[0]` will be the MSB and `address[5]` the LSB. # Example ``` # use btleplug::api::BDAddr; let addr: BDAddr = [0x2A, 0xCC, 0x00, 0x34, 0xFA, 0x00].into(); assert_eq!("2A:CC:00:34:FA:00", addr.to_string()); ```

(address: [u8; 6])

Source from the content-addressed store, hash-verified

72 /// assert_eq!("2A:CC:00:34:FA:00", addr.to_string());
73 /// ```
74 fn from(address: [u8; 6]) -> Self {
75 Self { address }
76 }
77}
78
79impl From<BDAddr> for [u8; 6] {

Callers

nothing calls this directly

Calls 1

into_innerMethod · 0.80

Tested by

no test coverage detected