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§
Sourcefn open(
&self,
selector: &DebugProbeSelector,
) -> Result<Box<dyn DebugProbe>, DebugProbeError>
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.
Sourcefn list_probes(&self) -> Vec<DebugProbeInfo>
fn list_probes(&self) -> Vec<DebugProbeInfo>
Returns a list of all available debug probes of the current type.