pub struct BluetoothUuid32(/* private fields */);
Expand description
A 32-bit Bluetooth UUID
Implementations§
Source§impl BluetoothUuid32
impl BluetoothUuid32
Sourcepub const fn new(uuid: u32) -> BluetoothUuid32
pub const fn new(uuid: u32) -> BluetoothUuid32
Creates a new UUID.
Sourcepub const fn from_le_bytes(bytes: [u8; 4]) -> BluetoothUuid32
pub const fn from_le_bytes(bytes: [u8; 4]) -> BluetoothUuid32
Creates a UUID from a little-endian byte array.
Sourcepub fn from_be_bytes(bytes: [u8; 4]) -> BluetoothUuid32
pub fn from_be_bytes(bytes: [u8; 4]) -> BluetoothUuid32
Creates a UUID from a big-endian byte array.
Sourcepub fn from_le_slice(
bytes: &[u8],
) -> Result<BluetoothUuid32, InvalidLengthError>
pub fn from_le_slice( bytes: &[u8], ) -> Result<BluetoothUuid32, InvalidLengthError>
Attempts to create a UUID from a little-endian byte slice.
Sourcepub fn from_be_slice(
bytes: &[u8],
) -> Result<BluetoothUuid32, InvalidLengthError>
pub fn from_be_slice( bytes: &[u8], ) -> Result<BluetoothUuid32, InvalidLengthError>
Attempts to create a UUID from a big-endian byte slice.
Sourcepub const fn as_le_bytes(&self) -> &[u8; 4]
pub const fn as_le_bytes(&self) -> &[u8; 4]
Returns the UUID as a little-endian byte array.
Sourcepub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_le_bytes(self) -> [u8; 4]
Consumes the UUID and returns its little-endian byte array representation.
Sourcepub fn to_be_bytes(self) -> [u8; 4]
pub fn to_be_bytes(self) -> [u8; 4]
Consumes the UUID and returns its big-endian byte array representation.
Sourcepub const fn as_le_slice(&self) -> &[u8]
pub const fn as_le_slice(&self) -> &[u8]
Returns the UUID as a little-endian byte slice.
Trait Implementations§
Source§impl AsRef<[u8]> for BluetoothUuid32
impl AsRef<[u8]> for BluetoothUuid32
Source§impl Clone for BluetoothUuid32
impl Clone for BluetoothUuid32
Source§fn clone(&self) -> BluetoothUuid32
fn clone(&self) -> BluetoothUuid32
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BluetoothUuid32
impl Debug for BluetoothUuid32
Source§impl Display for BluetoothUuid32
impl Display for BluetoothUuid32
Source§impl Format for BluetoothUuid32
impl Format for BluetoothUuid32
Source§impl From<BluetoothUuid32> for BluetoothUuid
impl From<BluetoothUuid32> for BluetoothUuid
Source§fn from(value: BluetoothUuid32) -> BluetoothUuid
fn from(value: BluetoothUuid32) -> BluetoothUuid
Converts to this type from the input type.
Source§impl From<u32> for BluetoothUuid32
impl From<u32> for BluetoothUuid32
Source§fn from(value: u32) -> BluetoothUuid32
fn from(value: u32) -> BluetoothUuid32
Converts to this type from the input type.
Source§impl Hash for BluetoothUuid32
impl Hash for BluetoothUuid32
Source§impl Ord for BluetoothUuid32
impl Ord for BluetoothUuid32
Source§fn cmp(&self, other: &BluetoothUuid32) -> Ordering
fn cmp(&self, other: &BluetoothUuid32) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BluetoothUuid32
impl PartialEq for BluetoothUuid32
Source§impl PartialOrd for BluetoothUuid32
impl PartialOrd for BluetoothUuid32
impl Copy for BluetoothUuid32
impl Eq for BluetoothUuid32
impl StructuralPartialEq for BluetoothUuid32
Auto Trait Implementations§
impl Freeze for BluetoothUuid32
impl RefUnwindSafe for BluetoothUuid32
impl Send for BluetoothUuid32
impl Sync for BluetoothUuid32
impl Unpin for BluetoothUuid32
impl UnwindSafe for BluetoothUuid32
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