pub trait AdapterHooksProvider: Send + Sync {
type Paths: WorkspacePaths + ?Sized;
type Telemetry: TelemetrySink<AdapterEvent> + ?Sized;
type Reporter: ErrorReporter + ?Sized;
type Formatter: ErrorFormatter + ?Sized;
// Required methods
fn workspace_paths(&self) -> &Self::Paths;
fn telemetry(&self) -> &Self::Telemetry;
fn error_reporter(&self) -> &Self::Reporter;
fn error_formatter(&self) -> &Self::Formatter;
}Expand description
Trait that bundles the adapter hook dependencies into a single interface.
This replaces the previous four-parameter generic bound
(Paths, Telemetry, Reporter, Formatter) with a single trait,
following the Config Trait pattern from the Rust Patterns guide
(Ch 3 — Config Trait Pattern).
Associated types keep the trait dyn-incompatible (which is intentional — these are compile-time wiring, not runtime polymorphism).
Required Associated Types§
type Paths: WorkspacePaths + ?Sized
type Telemetry: TelemetrySink<AdapterEvent> + ?Sized
type Reporter: ErrorReporter + ?Sized
type Formatter: ErrorFormatter + ?Sized
Required Methods§
fn workspace_paths(&self) -> &Self::Paths
fn telemetry(&self) -> &Self::Telemetry
fn error_reporter(&self) -> &Self::Reporter
fn error_formatter(&self) -> &Self::Formatter
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".