pub struct DeviceInfo {
pub board_id: BoardId,
pub firmware_version: String,
pub usb_api_version: u16,
pub serial: Option<u128>,
}Expand description
Device metadata collected while opening a HackRF.
Fields§
§board_id: BoardIdFirmware-reported board identity.
firmware_version: StringFirmware version string.
usb_api_version: u16Raw HackRF USB API version from the USB bcdDevice field.
The high byte is the major version and the low byte is the minor version,
matching libhackrf’s hexadecimal MM.mm convention.
serial: Option<u128>Full 128-bit MCU serial number, when it is nonzero.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub const fn board_name(&self) -> &'static str
pub const fn board_name(&self) -> &'static str
Human-readable board name.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DeviceInfo
impl Debug for DeviceInfo
impl Eq for DeviceInfo
Source§impl PartialEq for DeviceInfo
impl PartialEq for DeviceInfo
impl StructuralPartialEq for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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