pub struct Pidfile { /* private fields */ }Implementations§
Source§impl Pidfile
impl Pidfile
pub fn new(path: PathBuf) -> Self
Sourcepub fn acquire(&self) -> Result<()>
pub fn acquire(&self) -> Result<()>
Atomically create the pidfile and write our PID into it. Fails if the file already exists (intentional — caller must preflight stale files).
Auto Trait Implementations§
impl Freeze for Pidfile
impl RefUnwindSafe for Pidfile
impl Send for Pidfile
impl Sync for Pidfile
impl Unpin for Pidfile
impl UnsafeUnpin for Pidfile
impl UnwindSafe for Pidfile
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