pub enum PidLockError {
AlreadyHeld {
datadir: PathBuf,
pid: Option<u32>,
},
SetupFailed {
datadir: PathBuf,
source: Error,
},
}Expand description
Errors from constructing a pid-lock-based LockManager
(pid_flock::FlockPidLockManager or pid_fcntl::FcntlPidLockManager).
Pattern-match on this when you want to surface “another process is already using this datadir” differently from setup-failure cases.
Variants§
AlreadyHeld
Another instance — same process or otherwise — already holds
the pid lock for this datadir. The pid is the value that
instance wrote into the LOCK file (best-effort; may be absent
or stale).
SetupFailed
Anything else that went wrong setting up the datadir or opening the lock file (filesystem permission, ENOENT, etc.).
Trait Implementations§
Source§impl Debug for PidLockError
impl Debug for PidLockError
Source§impl Display for PidLockError
impl Display for PidLockError
Source§impl Error for PidLockError
impl Error for PidLockError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PidLockError
impl RefUnwindSafe for PidLockError
impl Send for PidLockError
impl Sync for PidLockError
impl Unpin for PidLockError
impl UnsafeUnpin for PidLockError
impl UnwindSafe for PidLockError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request