pub trait Backends {
type Units: UnitBackend;
type Gens: GenerationBackend + Clone + Send + 'static;
type Inv: InventoryBackend;
type Probes: ProbeBackend;
type Sessions: SessionBackend;
type Runtime: RuntimeOptionBackend;
type Procs: ProcessBackend;
type Clock: Clock;
// Required methods
fn units(&self) -> &Self::Units;
fn generations(&self) -> &Self::Gens;
fn inventory(&self) -> &Self::Inv;
fn probes(&self) -> &Self::Probes;
fn sessions(&self) -> &Self::Sessions;
fn runtime(&self) -> &Self::Runtime;
fn processes(&self) -> &Self::Procs;
fn clock(&self) -> &Self::Clock;
}Expand description
Every backend the system needs, as one generic parameter (§6: generics, no
dyn). The daemon and the watchdog instantiate it with the real backends;
the gym, with fakes.
Required Associated Types§
type Units: UnitBackend
Sourcetype Gens: GenerationBackend + Clone + Send + 'static
type Gens: GenerationBackend + Clone + Send + 'static
Cloned onto a worker thread for the slow part of planning a change.