#[non_exhaustive]pub struct UsbDeviceFilter {
pub vendor_id: Option<u16>,
pub product_id: Option<u16>,
pub class_code: Option<u8>,
pub subclass_code: Option<u8>,
pub protocol_code: Option<u8>,
pub serial_number: Option<String>,
}Expand description
A filter used to match specific USB devices by various criteria.
Fields left as None will match any value in that field.
Fields (Non-exhaustive)ยง
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.vendor_id: Option<u16>Optional USB vendor ID.
product_id: Option<u16>Optional USB product ID.
class_code: Option<u8>Optional USB device class code.
subclass_code: Option<u8>Optional USB device subclass code.
protocol_code: Option<u8>Optional USB device protocol code.
serial_number: Option<String>Optional USB device serial number.
Implementationsยง
Trait Implementationsยง
Sourceยงimpl Clone for UsbDeviceFilter
impl Clone for UsbDeviceFilter
Sourceยงfn clone(&self) -> UsbDeviceFilter
fn clone(&self) -> UsbDeviceFilter
Returns a copy 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 UsbDeviceFilter
impl Debug for UsbDeviceFilter
Sourceยงimpl Default for UsbDeviceFilter
impl Default for UsbDeviceFilter
Sourceยงfn default() -> UsbDeviceFilter
fn default() -> UsbDeviceFilter
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl From<&UsbDeviceFilter> for UsbDeviceFilter
impl From<&UsbDeviceFilter> for UsbDeviceFilter
Sourceยงfn from(value: &UsbDeviceFilter) -> Self
fn from(value: &UsbDeviceFilter) -> Self
Converts to this type from the input type.
Auto Trait Implementationsยง
impl Freeze for UsbDeviceFilter
impl RefUnwindSafe for UsbDeviceFilter
impl Send for UsbDeviceFilter
impl Sync for UsbDeviceFilter
impl Unpin for UsbDeviceFilter
impl UnwindSafe for UsbDeviceFilter
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