pub enum TryLockError {
Error(Error),
WouldBlock,
}
🔬This is a nightly-only experimental API. (
file_lock
)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
)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
)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
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.