Struct priomutex::reservable::MutexGuard [] [src]

pub struct MutexGuard<'a, T: ?Sized + 'a> { /* fields omitted */ }

An RAII guard. Frees the mutex when dropped.

While the guard is still valid, it can be dereferenced to access the data protected by the mutex. Attempting to dereference a guard which has been released will result in a panic!

Methods

impl<'a, T: ?Sized> MutexGuard<'a, T>
[src]

[src]

Invalidate the guard and release the lock. If this lock has already been released, calling this function again does nothing.

  • If no thread ID was specified: any other thread will be able to take the lock.
  • If a thread ID was specified: only the specified thread will be able to take the lock.

It is not necessary to call this function yourself, since it will be run automatically when the guard goes out of scope.

Trait Implementations

impl<'a, T: ?Sized> Drop for MutexGuard<'a, T>
[src]

[src]

Release the mutex, without reserving it for any particular thread.

impl<'a, T: ?Sized> Deref for MutexGuard<'a, T>
[src]

The resulting type after dereferencing.

[src]

Will panic if the guard has already been released via a call to release_to.

impl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T>
[src]

[src]

Will panic if the guard has already been released via a call to release_to.