Enum TryLockError

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(io::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.

Implementations

impl Debug for TryLockError

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl Display for TryLockError

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl Error for TryLockError

impl Freeze for TryLockError

impl RefUnwindSafe for TryLockError

impl Send for TryLockError

impl Sync for TryLockError

impl Unpin for TryLockError

impl UnwindSafe for TryLockError

impl<T> Any for TryLockError

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for TryLockError

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for TryLockError

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for TryLockError

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToString for TryLockError

fn to_string(self: &Self) -> String

impl<T, U> Into for TryLockError

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for TryLockError

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for TryLockError

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>