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

Method to_ble_u32

src/api/bleuuid.rs:36–43  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

34
35impl BleUuid for Uuid {
36 fn to_ble_u32(&self) -> Option<u32> {
37 let value = self.as_u128();
38 if value & BLUETOOTH_BASE_MASK == BLUETOOTH_BASE_UUID {
39 Some((value >> 96) as u32)
40 } else {
41 None
42 }
43 }
44
45 fn to_ble_u16(&self) -> Option<u16> {
46 let value = self.as_u128();

Callers 1

to_short_stringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected