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

Method to_short_string

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

Source from the content-addressed store, hash-verified

52 }
53
54 fn to_short_string(&self) -> String {
55 if let Some(uuid16) = self.to_ble_u16() {
56 format!("{:#04x}", uuid16)
57 } else if let Some(uuid32) = self.to_ble_u32() {
58 format!("{:#06x}", uuid32)
59 } else {
60 self.to_string()
61 }
62 }
63}
64
65#[cfg(test)]

Callers 1

mainFunction · 0.80

Calls 2

to_ble_u16Method · 0.80
to_ble_u32Method · 0.80

Tested by

no test coverage detected