pub enum LockError {
Timeout {
path: PathBuf,
waited: Duration,
},
AlreadyLocked {
path: PathBuf,
holder: Option<String>,
},
}Expand description
Errors related to concurrency and locking.
Variants§
Implementations§
Source§impl LockError
impl LockError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Machine-readable error code.
Sourcepub fn suggestion(&self) -> String
pub fn suggestion(&self) -> String
Human-readable suggestion.
Trait Implementations§
Source§impl Error for LockError
impl Error for LockError
1.30.0 · 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 LockError
impl RefUnwindSafe for LockError
impl Send for LockError
impl Sync for LockError
impl Unpin for LockError
impl UnsafeUnpin for LockError
impl UnwindSafe for LockError
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