Trait probe_rs::probe::ProbeFactory

source ·
pub trait ProbeFactory: Any + Display + Debug + Sync {
    // Required methods
    fn open(
        &self,
        selector: &DebugProbeSelector
    ) -> Result<Box<dyn DebugProbe>, DebugProbeError>;
    fn list_probes(&self) -> Vec<DebugProbeInfo>;
}
Expand description

An abstraction over a probe driver type.

This trait has to be implemented by ever debug probe driver.

The std::fmt::Display implementation will be used to display the probe in the list of available probes, and should return a human-readable name for the probe type.

Required Methods§

source

fn open( &self, selector: &DebugProbeSelector ) -> Result<Box<dyn DebugProbe>, DebugProbeError>

Creates a new boxed DebugProbe from a given DebugProbeSelector. This will be called for all available debug drivers when discovering probes. When opening, it will open the first probe which succeeds during this call.

source

fn list_probes(&self) -> Vec<DebugProbeInfo>

Returns a list of all available debug probes of the current type.

Trait Implementations§

source§

impl PartialEq for dyn ProbeFactory

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementors§