[][src]Enum simplelock::SimpleLockError

pub enum SimpleLockError {
    AlreadyLocked,
    InvalidName,
    UnableToUnlock(String),
    PermissionDenied,
    NoLockEnabled,
    UnknownError(String),
}

SimpleLock's Error type.

Variants

AlreadyLocked

The Lock was already taken by another process, we cannot lock.

This will only be returned if the LockConfig provided explicitly disables hang_lock. In other-words, if we want to fail immediately on the inability to lock.

InvalidName

The name given on Lock creation (either with default_lock or an implementation's constructor) is invalid.

This can be due to OS path name restrictions or being invalid unicode, etc.

UnableToUnlock(String)

We failed to unlock the Lock.

This can be due to a number of issues. Using FileLock as an example, if the temporary file disappears due to an unreliable OS File-Cleaner, its permissions change out-from-under-us, etc.

PermissionDenied

The File Descriptor was created with permissions you do not currently have.

This may happen if the program was executed as a super-user and failed to clean up open files. If not using the provided utility functionality, please revisit them to see if any fit your needs. They may handle an edge-case your application hits.

NoLockEnabled

Thrown when calling default_lock and no feature flag was enabled.

UnknownError(String)

An unexpected error from one of the Lock implementations. If this happens, please file a ticket with us as we would like to harden this library over time.

Trait Implementations

impl Debug for SimpleLockError[src]

impl Display for SimpleLockError[src]

impl Eq for SimpleLockError[src]

impl Error for SimpleLockError[src]

impl From<Errno> for SimpleLockError[src]

impl From<Error> for SimpleLockError[src]

impl From<Error> for SimpleLockError[src]

impl From<ErrorKind> for SimpleLockError[src]

impl Ord for SimpleLockError[src]

impl PartialEq<SimpleLockError> for SimpleLockError[src]

impl PartialOrd<SimpleLockError> for SimpleLockError[src]

impl StructuralEq for SimpleLockError[src]

impl StructuralPartialEq for SimpleLockError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,