server_manager/manager/
struct.rs

1use crate::*;
2
3/// Main structure for managing server processes.
4///
5/// Encapsulates all server management operations and holds necessary configuration.
6#[derive(Clone)]
7pub struct ServerManager {
8    /// Path to the PID file for process tracking.
9    pub(crate) pid_file: String,
10    /// An asynchronous function to be called before stopping the server.
11    pub(crate) stop_hook: Hook,
12    /// An asynchronous function to be called before starting the server.
13    pub(crate) start_hook: Hook,
14    /// Server function to be executed.
15    pub(crate) server_hook: Hook,
16}