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

Method to_ble_u16

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

Source from the content-addressed store, hash-verified

43 }
44
45 fn to_ble_u16(&self) -> Option<u16> {
46 let value = self.as_u128();
47 if value & BLUETOOTH_BASE_MASK_16 == BLUETOOTH_BASE_UUID {
48 Some((value >> 96) as u16)
49 } else {
50 None
51 }
52 }
53
54 fn to_short_string(&self) -> String {
55 if let Some(uuid16) = self.to_ble_u16() {

Callers 1

to_short_stringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected