pub struct PeripheralId {
pub model_number: u64,
pub serial_number: u64,
}Expand description
Unique identifier that combines model number and serial number. Only one individual unit will have a given peripheral ID.
Fields§
§model_number: u64§serial_number: u64Trait Implementations§
Source§impl ByteStruct for PeripheralId
impl ByteStruct for PeripheralId
Source§fn write_bytes(&self, bytes: &mut [u8])
fn write_bytes(&self, bytes: &mut [u8])
Packs the struct into raw bytes and write to a slice
Source§fn read_bytes(bytes: &[u8]) -> PeripheralId
fn read_bytes(bytes: &[u8]) -> PeripheralId
Unpacks raw bytes from a slice into a new struct
Source§impl ByteStructLen for PeripheralId
impl ByteStructLen for PeripheralId
Source§impl Clone for PeripheralId
impl Clone for PeripheralId
Source§fn clone(&self) -> PeripheralId
fn clone(&self) -> PeripheralId
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 PeripheralId
impl Debug for PeripheralId
Source§impl Default for PeripheralId
impl Default for PeripheralId
Source§fn default() -> PeripheralId
fn default() -> PeripheralId
Returns the “default value” for a type. Read more
Source§impl Ord for PeripheralId
impl Ord for PeripheralId
Source§fn cmp(&self, other: &PeripheralId) -> Ordering
fn cmp(&self, other: &PeripheralId) -> 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 PeripheralId
impl PartialEq for PeripheralId
Source§impl PartialOrd for PeripheralId
impl PartialOrd for PeripheralId
impl Copy for PeripheralId
impl Eq for PeripheralId
impl StructuralPartialEq for PeripheralId
Auto Trait Implementations§
impl Freeze for PeripheralId
impl RefUnwindSafe for PeripheralId
impl Send for PeripheralId
impl Sync for PeripheralId
impl Unpin for PeripheralId
impl UnwindSafe for PeripheralId
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
Source§impl<T> ByteStructUnspecifiedByteOrder for Twhere
T: ByteStruct,
impl<T> ByteStructUnspecifiedByteOrder for Twhere
T: ByteStruct,
Source§fn write_bytes_default_le(&self, bytes: &mut [u8])
fn write_bytes_default_le(&self, bytes: &mut [u8])
A wrapper of ByteStruct::write_bytes
Source§fn read_bytes_default_le(bytes: &[u8]) -> T
fn read_bytes_default_le(bytes: &[u8]) -> T
A wrapper of ByteStruct::read_bytes
Source§fn write_bytes_default_be(&self, bytes: &mut [u8])
fn write_bytes_default_be(&self, bytes: &mut [u8])
A wrapper of ByteStruct::write_bytes
Source§fn read_bytes_default_be(bytes: &[u8]) -> T
fn read_bytes_default_be(bytes: &[u8]) -> T
A wrapper of ByteStruct::read_bytes
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more