daemon-base 0.1.1

A flexible and configurable Rust daemon library with lifecycle management, logging, callbacks, and optional async support. Works on Linux, macOS, and Windows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Error handling for the daemon library.
//!
//! This module defines the `DaemonError` enum, which represents errors that can occur
//! during the daemon's lifecycle.

use thiserror::Error;

/// Represents errors that can occur in the daemon.
#[derive(Debug, Error)]
pub enum DaemonError {
    #[error("Daemon is already running")]
    AlreadyRunning,
    #[error("Daemon is not running")]
    NotRunning,
    #[error("Custom error: {0}")]
    CustomError(String),
}