pub struct UniqueIdentifier { /* private fields */ }
Expand description
The unique id that is used as a source id in the packages.
There shouldn’t be multiple devices with same unique id. The manufacturer uids are assigned by the esta. more information
Implementations§
Source§impl UniqueIdentifier
impl UniqueIdentifier
pub const fn new( manufacturer_uid: u16, device_uid: u32, ) -> Result<Self, DeserializationError>
pub fn manufacturer_uid(&self) -> u16
pub fn device_uid(&self) -> u32
pub fn set_manufacturer_uid( &mut self, manufacturer_uid: u16, ) -> Result<(), DeserializationError>
pub fn set_device_uid( &mut self, device_uid: u32, ) -> Result<(), DeserializationError>
pub fn to_bytes(&self) -> [u8; 6]
Trait Implementations§
Source§impl Clone for UniqueIdentifier
impl Clone for UniqueIdentifier
Source§fn clone(&self) -> UniqueIdentifier
fn clone(&self) -> UniqueIdentifier
Returns a duplicate 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 UniqueIdentifier
impl Debug for UniqueIdentifier
Source§impl Display for UniqueIdentifier
impl Display for UniqueIdentifier
Source§impl Format for UniqueIdentifier
impl Format for UniqueIdentifier
Source§impl From<UniqueIdentifier> for u64
impl From<UniqueIdentifier> for u64
Source§fn from(value: UniqueIdentifier) -> Self
fn from(value: UniqueIdentifier) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UniqueIdentifier
impl PartialEq for UniqueIdentifier
Source§impl TryFrom<u64> for UniqueIdentifier
impl TryFrom<u64> for UniqueIdentifier
impl Copy for UniqueIdentifier
impl Eq for UniqueIdentifier
impl StructuralPartialEq for UniqueIdentifier
Auto Trait Implementations§
impl Freeze for UniqueIdentifier
impl RefUnwindSafe for UniqueIdentifier
impl Send for UniqueIdentifier
impl Sync for UniqueIdentifier
impl Unpin for UniqueIdentifier
impl UnwindSafe for UniqueIdentifier
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