Enum TryLockError
pub enum TryLockError
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::WouldBlockerror insideTryLockError::Error-
WouldBlock The lock could not be acquired at this time because it is held by another handle/process.
Trait Implementations
impl Debug for TryLockError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for TryLockError
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Error for TryLockError
Auto Trait Implementations
impl !RefUnwindSafe for TryLockError
impl !UnwindSafe for TryLockError
impl Freeze for TryLockError
impl Send for TryLockError
impl Sync for TryLockError
impl Unpin for TryLockError
impl UnsafeUnpin for TryLockError
Blanket Implementations
impl<T> Any for TryLockError
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TryLockError
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TryLockError
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for TryLockError
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for TryLockError
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for TryLockError
impl<T> ToString for TryLockError
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for TryLockError
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TryLockError
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for TryLockError
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>