pub struct DeviceId {
pub device_type: DeviceType,
pub index: u32,
}Expand description
A specific device instance: a DeviceType plus an ordinal index.
Fields§
§device_type: DeviceType§index: u32Implementations§
Source§impl DeviceId
impl DeviceId
Sourcepub fn new(device_type: DeviceType, index: u32) -> DeviceId
pub fn new(device_type: DeviceType, index: u32) -> DeviceId
Construct a device id.
Sourcepub fn is_host_accessible(self) -> bool
pub fn is_host_accessible(self) -> bool
Whether this device is host-accessible (see DeviceType::is_host_accessible).
Trait Implementations§
impl Copy for DeviceId
impl Eq for DeviceId
impl StructuralPartialEq for DeviceId
Auto Trait Implementations§
impl Freeze for DeviceId
impl RefUnwindSafe for DeviceId
impl Send for DeviceId
impl Sync for DeviceId
impl Unpin for DeviceId
impl UnsafeUnpin for DeviceId
impl UnwindSafe for DeviceId
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