pub enum Uuid {
Short(u16),
Long([u8; 16]),
}Expand description
A 16- or 128-bit attribute type, as it appears on the wire.
Variants§
Implementations§
Source§impl Uuid
impl Uuid
Sourcepub fn parse(bytes: &[u8]) -> Option<Self>
pub fn parse(bytes: &[u8]) -> Option<Self>
Decode from wire bytes: 2 for a short UUID, 16 for a long one.
Both go out least-significant byte first, so a 128-bit UUID on the wire is the reverse of how it is written.
Sourcepub fn to_canonical(&self) -> String
pub fn to_canonical(&self) -> String
The canonical 128-bit lowercase string, expanding the Bluetooth base UUID for short forms.
Trait Implementations§
impl Eq for Uuid
impl StructuralPartialEq for Uuid
Auto Trait Implementations§
impl Freeze for Uuid
impl RefUnwindSafe for Uuid
impl Send for Uuid
impl Sync for Uuid
impl Unpin for Uuid
impl UnsafeUnpin for Uuid
impl UnwindSafe for Uuid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more