pub struct HardwareId { /* private fields */ }Expand description
12-byte Hardware ID read from device memory at 0x40010450
Structure:
- Bytes 0-5: Serial prefix (e.g., “071KBP” ASCII)
- Bytes 6-7: Separator (typically 0x0D 0xFF)
- Bytes 8-9: Device ID (little-endian u16)
- Bytes 10-11: Padding (typically 0xFF 0xFF)
Implementations§
Source§impl HardwareId
impl HardwareId
Sourcepub fn from_bytes(bytes: [u8; 12]) -> Self
pub fn from_bytes(bytes: [u8; 12]) -> Self
Create HardwareId from raw bytes
Sourcepub fn serial_prefix(&self) -> Option<String>
pub fn serial_prefix(&self) -> Option<String>
Get the serial prefix (first 6 bytes as ASCII string)
Trait Implementations§
Source§impl Clone for HardwareId
impl Clone for HardwareId
Source§impl Debug for HardwareId
impl Debug for HardwareId
Source§impl Display for HardwareId
impl Display for HardwareId
impl Eq for HardwareId
Source§impl From<&HardwareId> for AuthCredential
impl From<&HardwareId> for AuthCredential
Source§fn from(hardware_id: &HardwareId) -> Self
fn from(hardware_id: &HardwareId) -> Self
Converts to this type from the input type.
Source§impl From<HardwareId> for AuthCredential
impl From<HardwareId> for AuthCredential
Source§fn from(hardware_id: HardwareId) -> Self
fn from(hardware_id: HardwareId) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HardwareId
impl PartialEq for HardwareId
impl StructuralPartialEq for HardwareId
Auto Trait Implementations§
impl Freeze for HardwareId
impl RefUnwindSafe for HardwareId
impl Send for HardwareId
impl Sync for HardwareId
impl Unpin for HardwareId
impl UnsafeUnpin for HardwareId
impl UnwindSafe for HardwareId
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