Skip to main content

Manager

Trait Manager 

Source
pub trait Manager {
    // Required methods
    fn within(&mut self, wait: Duration);
    fn reload(&mut self) -> Result<(), CallError>;
    fn reset_failed(&mut self, unit: &str) -> Result<(), CallError>;
    fn start(&mut self, unit: &str) -> Result<(), CallError>;
    fn stop(&mut self, unit: &str) -> Result<(), CallError>;
    fn active_state(&mut self, unit: &str) -> Result<Option<String>, CallError>;
}
Expand description

What the manager is asked to do, so a control can record it instead of reaching a manager.

Required Methods§

Source

fn within(&mut self, wait: Duration)

Gives the calls that follow wait from now in all, so that each phase of provisioning has a time of its own.

Source

fn reload(&mut self) -> Result<(), CallError>

Reloads the unit files.

Source

fn reset_failed(&mut self, unit: &str) -> Result<(), CallError>

Clears a unit’s failed state and start-rate counter.

Source

fn start(&mut self, unit: &str) -> Result<(), CallError>

Starts a unit.

Source

fn stop(&mut self, unit: &str) -> Result<(), CallError>

Stops a unit.

Source

fn active_state(&mut self, unit: &str) -> Result<Option<String>, CallError>

The unit’s state as the manager reports it (active, deactivating, inactive, failed), or nothing when the manager holds no such unit.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§