pub struct ServerLifecycle { /* private fields */ }Expand description
Manages server lifecycle (PID files, etc.)
Implementations§
Source§impl ServerLifecycle
impl ServerLifecycle
Sourcepub fn new(xdg_directories: Arc<XdgDirectories>) -> Self
pub fn new(xdg_directories: Arc<XdgDirectories>) -> Self
Create a new server lifecycle manager
Sourcepub fn is_server_running(&self) -> bool
pub fn is_server_running(&self) -> bool
Check if a server is already running
Sourcepub fn write_pid(&self) -> Result<(), Box<dyn Error + Send + Sync>>
pub fn write_pid(&self) -> Result<(), Box<dyn Error + Send + Sync>>
Write current process PID to file
Sourcepub fn socket_path(&self) -> PathBuf
pub fn socket_path(&self) -> PathBuf
Get the server socket path
Auto Trait Implementations§
impl Freeze for ServerLifecycle
impl RefUnwindSafe for ServerLifecycle
impl Send for ServerLifecycle
impl Sync for ServerLifecycle
impl Unpin for ServerLifecycle
impl UnwindSafe for ServerLifecycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more