pub trait ServiceProvider: Send + Sync {
// Required methods
fn kind(&self) -> ServiceKind;
fn detect(&self, probe_output: &ProbeOutput) -> bool;
// Provided method
fn quick_metrics(&self, _probe_output: &ProbeOutput) -> Vec<ServiceMetric> { ... }
}Expand description
Trait for service-specific detection from probe output.
Each provider implements:
- Quick detection from probe output
- Basic metric extraction from Quick Scan output
Required Methods§
Sourcefn kind(&self) -> ServiceKind
fn kind(&self) -> ServiceKind
Returns the service type this provider handles.
Sourcefn detect(&self, probe_output: &ProbeOutput) -> bool
fn detect(&self, probe_output: &ProbeOutput) -> bool
Quick check: is this service present on the server?
Called during Quick Scan with the parsed probe output. Should be fast — only check for presence, not detailed metrics.
Provided Methods§
Sourcefn quick_metrics(&self, _probe_output: &ProbeOutput) -> Vec<ServiceMetric>
fn quick_metrics(&self, _probe_output: &ProbeOutput) -> Vec<ServiceMetric>
Extract basic metrics from Quick Scan probe output.
This is called immediately during Quick Scan to provide basic service information. Default implementation returns empty metrics.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".