pub struct DeviceInfo {
pub vendor_id: u16,
pub product_id: u16,
pub manufacturer_name: String,
pub device_name: String,
pub device_id: DeviceID,
pub device_type: DeviceType,
}
Expand description
The core DeviceInfo
struct which contains all the interesting information
for a particular device. This is for use internally and should be ignored if you’re
trying to use it when trying to interact with the SDK using the wrapper
Fields§
§vendor_id: u16
Device Vendor ID vid
product_id: u16
Device Product ID pid
manufacturer_name: String
Device Manufacturer name
device_name: String
Device name
device_id: DeviceID
Unique device ID, which should be generated using generate_device_id
device_type: DeviceType
Hardware type of the Device
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
pub fn new_with_id( vendor_id: u16, product_id: u16, manufacturer_name: String, device_name: String, device_id: DeviceID, device_type: DeviceType, ) -> Self
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 · 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
Source§impl From<DeviceInfo> for DeviceInfo_FFI
impl From<DeviceInfo> for DeviceInfo_FFI
Source§fn from(device: DeviceInfo) -> Self
fn from(device: DeviceInfo) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin 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