Trait sd_switch::systemd::JobSet

source ·
pub trait JobSet {
    // Required methods
    fn reload_unit(&mut self, unit_name: &str) -> Result<(), Error>;
    fn restart_unit(&mut self, unit_name: &str) -> Result<(), Error>;
    fn start_unit(&mut self, unit_name: &str) -> Result<(), Error>;
    fn stop_unit(&mut self, unit_name: &str) -> Result<(), Error>;
    fn wait_for_all<F>(
        &mut self,
        job_handler: F,
        timeout: Duration,
    ) -> Result<(), Error>
       where F: Fn(&str, &str) + Send + 'static;
}

Required Methods§

source

fn reload_unit(&mut self, unit_name: &str) -> Result<(), Error>

source

fn restart_unit(&mut self, unit_name: &str) -> Result<(), Error>

source

fn start_unit(&mut self, unit_name: &str) -> Result<(), Error>

source

fn stop_unit(&mut self, unit_name: &str) -> Result<(), Error>

source

fn wait_for_all<F>( &mut self, job_handler: F, timeout: Duration, ) -> Result<(), Error>
where F: Fn(&str, &str) + Send + 'static,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> JobSet for DbusJobSet<'a>

source§

impl<'a> JobSet for SystemctlJobSet<'a>