Skip to main content

Backends

Trait Backends 

Source
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§

Source

type Units: UnitBackend

Source

type Gens: GenerationBackend + Clone + Send + 'static

Cloned onto a worker thread for the slow part of planning a change.

Source

type Inv: InventoryBackend

Source

type Probes: ProbeBackend

Source

type Sessions: SessionBackend

Source

type Runtime: RuntimeOptionBackend

Source

type Procs: ProcessBackend

Source

type Clock: Clock

Required Methods§

Source

fn units(&self) -> &Self::Units

Source

fn generations(&self) -> &Self::Gens

Source

fn inventory(&self) -> &Self::Inv

Source

fn probes(&self) -> &Self::Probes

Source

fn sessions(&self) -> &Self::Sessions

Source

fn runtime(&self) -> &Self::Runtime

Source

fn processes(&self) -> &Self::Procs

Source

fn clock(&self) -> &Self::Clock

Implementors§