pub struct Uuid(/* private fields */);Expand description
16-, 32-, or 128-bit UUID ([Vol 3] Part B, Section 2.5.1).
Implementations§
Source§impl Uuid
impl Uuid
Sourcepub const unsafe fn new_unchecked(v: u128) -> Self
pub const unsafe fn new_unchecked(v: u128) -> Self
Creates a UUID from a u128 without checking whether the value is
non-zero.
§Safety
The value must not be zero.
Sourcepub fn typ(self) -> UuidType
pub fn typ(self) -> UuidType
Returns the UUID type. Returns UuidType::NonSig for non-SIG UUID.
Sourcepub fn as_u16(self) -> Option<u16>
pub fn as_u16(self) -> Option<u16>
Converts an assigned 16-bit Bluetooth SIG UUID to u16. This is
mutually exclusive with as_u32 and as_u128.
Sourcepub fn as_u32(self) -> Option<u32>
pub fn as_u32(self) -> Option<u32>
Converts an assigned 32-bit Bluetooth SIG UUID to u32. This is
mutually exclusive with as_u16 and as_u128.
Trait Implementations§
Source§impl From<Characteristic> for Uuid
impl From<Characteristic> for Uuid
Source§fn from(v: Characteristic) -> Self
fn from(v: Characteristic) -> Self
Converts to this type from the input type.
Source§impl From<Declaration> for Uuid
impl From<Declaration> for Uuid
Source§fn from(v: Declaration) -> Self
fn from(v: Declaration) -> Self
Converts to this type from the input type.
Source§impl From<Descriptor> for Uuid
impl From<Descriptor> for Uuid
Source§fn from(v: Descriptor) -> Self
fn from(v: Descriptor) -> Self
Converts to this type from the input type.
Source§impl From<ServiceClass> for Uuid
impl From<ServiceClass> for Uuid
Source§fn from(v: ServiceClass) -> Self
fn from(v: ServiceClass) -> Self
Converts to this type from the input type.
Source§impl Ord for Uuid
impl Ord for Uuid
Source§impl PartialEq<Characteristic> for Uuid
impl PartialEq<Characteristic> for Uuid
Source§impl PartialEq<Declaration> for Uuid
impl PartialEq<Declaration> for Uuid
Source§impl PartialEq<Descriptor> for Uuid
impl PartialEq<Descriptor> for Uuid
Source§impl PartialEq<ServiceClass> for Uuid
impl PartialEq<ServiceClass> for Uuid
Source§impl PartialEq<Uuid> for Characteristic
impl PartialEq<Uuid> for Characteristic
Source§impl PartialEq<Uuid> for Declaration
impl PartialEq<Uuid> for Declaration
Source§impl PartialEq<Uuid> for Descriptor
impl PartialEq<Uuid> for Descriptor
Source§impl PartialEq<Uuid> for ServiceClass
impl PartialEq<Uuid> for ServiceClass
Source§impl PartialOrd for Uuid
impl PartialOrd for Uuid
impl Copy for Uuid
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 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