Struct try_mutex::TryMutex [] [src]

pub struct TryMutex<T> { /* fields omitted */ }

A mutual exclusion primitive that does not support blocking or poisoning. This results in a simpler and faster implementation.

Methods

impl<T> TryMutex<T>
[src]

[src]

Create a new mutex in unlocked state

[src]

Attemps to acquire a lock on this mutex. If this mutex is currently locked, None is returned. Otherwise a RAII guard is returned. The lock will be unlocked when the guard is dropped.

[src]

[src]

Retrieve a mutable reference to the underlying data. Since this mutably borrows the mutex, no actual locking needs to take place.

Trait Implementations

impl<T: Default> Default for TryMutex<T>
[src]

[src]

Returns the "default value" for a type. Read more

impl<T: Debug> Debug for TryMutex<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T> UnwindSafe for TryMutex<T>
[src]

impl<T> RefUnwindSafe for TryMutex<T>
[src]

impl<T> Sync for TryMutex<T>
[src]

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

[src]

Performs the conversion.

Auto Trait Implementations

impl<T> Send for TryMutex<T> where
    T: Send