pub enum TryLockError {
Error(Error),
WouldBlock,
}
Expand description
An enumeration of possible errors which can occur while trying to acquire a lock
from the try_lock
method and try_lock_shared
method on a File
.
Variantsยง
Error(Error)
The lock could not be acquired due to an I/O error on the file. The standard library will
not return an ErrorKind::WouldBlock
error inside TryLockError::Error
WouldBlock
The lock could not be acquired at this time because it is held by another handle/process.
Trait Implementationsยง
1.89.0 ยท Sourceยงimpl Debug for TryLockError
impl Debug for TryLockError
1.89.0 ยท Sourceยงimpl Display for TryLockError
impl Display for TryLockError
1.89.0 ยท Sourceยงimpl Error for TryLockError
impl Error for TryLockError
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()
1.89.0 ยท Sourceยงimpl From<TryLockError> for Error
impl From<TryLockError> for Error
Sourceยงfn from(err: TryLockError) -> Error
fn from(err: TryLockError) -> Error
Converts to this type from the input type.
Auto Trait Implementationsยง
impl Freeze for TryLockError
impl !RefUnwindSafe for TryLockError
impl Send for TryLockError
impl Sync for TryLockError
impl Unpin for TryLockError
impl !UnwindSafe for TryLockError
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