Struct probe_rs::DebugProbeInfo
source · [−]pub struct DebugProbeInfo {
pub identifier: String,
pub vendor_id: u16,
pub product_id: u16,
pub serial_number: Option<String>,
pub probe_type: DebugProbeType,
pub hid_interface: Option<u8>,
}
Expand description
Gathers some information about a debug probe which was found during a scan.
Fields
identifier: String
The name of the debug probe.
vendor_id: u16
The USB vendor ID of the debug probe.
product_id: u16
The USB product ID of the debug probe.
serial_number: Option<String>
The serial number of the debug probe.
probe_type: DebugProbeType
The probe type of the debug probe.
hid_interface: Option<u8>
The USB HID interface which should be used. This is necessary for composite HID devices.
Implementations
sourceimpl DebugProbeInfo
impl DebugProbeInfo
sourcepub fn new<S: Into<String>>(
identifier: S,
vendor_id: u16,
product_id: u16,
serial_number: Option<String>,
probe_type: DebugProbeType,
usb_hid_interface: Option<u8>
) -> Self
pub fn new<S: Into<String>>(
identifier: S,
vendor_id: u16,
product_id: u16,
serial_number: Option<String>,
probe_type: DebugProbeType,
usb_hid_interface: Option<u8>
) -> Self
Creates a new info struct that uniquely identifies a probe.
sourcepub fn open(&self) -> Result<Probe, DebugProbeError>
pub fn open(&self) -> Result<Probe, DebugProbeError>
Open the probe described by this DebugProbeInfo
.
Trait Implementations
sourceimpl Clone for DebugProbeInfo
impl Clone for DebugProbeInfo
sourcefn clone(&self) -> DebugProbeInfo
fn clone(&self) -> DebugProbeInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for DebugProbeInfo
impl Debug for DebugProbeInfo
sourceimpl From<&DebugProbeInfo> for DebugProbeSelector
impl From<&DebugProbeInfo> for DebugProbeSelector
sourcefn from(selector: &DebugProbeInfo) -> Self
fn from(selector: &DebugProbeInfo) -> Self
Converts to this type from the input type.
sourceimpl From<DebugProbeInfo> for DebugProbeSelector
impl From<DebugProbeInfo> for DebugProbeSelector
sourcefn from(selector: DebugProbeInfo) -> Self
fn from(selector: DebugProbeInfo) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for DebugProbeInfo
impl Send for DebugProbeInfo
impl Sync for DebugProbeInfo
impl Unpin for DebugProbeInfo
impl UnwindSafe for DebugProbeInfo
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more