daemon 0.0.8

Library for creating simple Linux demons and Windows services.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io::Error;
use std::sync::mpsc::Receiver;

pub enum State {
    Start,
    Reload,
    Stop,
}

pub struct Daemon {
    // Daemon name
    pub name: String,
}

pub trait DaemonRunner {
    fn run<F: 'static + FnOnce(Receiver<State>)>(&self, f: F) -> Result<(), Error>;
}