# Enum std::sync::TryLockError 1.0.0[−][src]

    pub enum TryLockError<T> {
        Poisoned(PoisonError<T>),
        WouldBlock,
    }

An enumeration of possible errors associated with a `TryLockResult` which can occur while trying to acquire a lock, from the `try_lock` method on a `Mutex` or the `try_read` and `try_write` methods on an `RwLock`.

## Variants

`Poisoned(PoisonError<T>)`

The lock could not be acquired because another thread failed while holding the lock.

`WouldBlock`

The lock could not be acquired at this time because the operation would otherwise block.

## Trait Implementations

###

`impl<T> From<PoisonError<T>> for TryLockError<T>`

[src]

####

`fn from(err: PoisonError<T>) -> TryLockError<T>`

[src]

Performs the conversion.

###

`impl<T> Debug for TryLockError<T>`

[src]

####

`fn fmt(&self, f: &mut Formatter) -> Result`

[src]

Formats the value using the given formatter. Read more

###

`impl<T> Display for TryLockError<T>`

[src]

####

`fn fmt(&self, f: &mut Formatter) -> Result`

[src]

Formats the value using the given formatter. Read more

###

`impl<T> Error for TryLockError<T>`

[src]

####

`fn description(&self) -> &str`

[src]

This method is soft-deprecated. Read more

####

`fn cause(&self) -> Option<&Error>`

[src]

The lower-level cause of this error, if any. Read more

## Auto Trait Implementations

###

`impl<T> Send for TryLockError<T> where T: Send,`

###

`impl<T> Sync for TryLockError<T> where T: Sync,`

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g. `str,u8` or `String,struct:Vec,test`)