pub enum TryLockError {
Error(Error),
WouldBlock,
}
🔬This is a nightly-only experimental API. (
file_lock
#130994)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)
🔬This is a nightly-only experimental API. (
file_lock
#130994)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
🔬This is a nightly-only experimental API. (
file_lock
#130994)The lock could not be acquired at this time because it is held by another handle/process.
Trait Implementations§
Source§impl Debug for TryLockError
impl Debug for TryLockError
Source§impl Display for TryLockError
impl Display for TryLockError
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()
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