# Struct qutex::Qutex [−] [src]

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

A lock-free-queue-backed exclusive data lock.

## Methods

### `impl<T> Qutex<T>`
[src]

#### `pub fn new(val: T) -> Qutex<T>`
[src]

Creates and returns a new `Qutex`.

#### `pub fn lock(self) -> FutureGuard<T>`
[src]

Returns a new `FutureGuard` which can be used as a future and will resolve into a `Guard`.

#### `pub unsafe fn push_request(&self, req: Request)`
[src]

Pushes a lock request onto the queue.

#### `pub fn get_mut(&mut self) -> Option<&mut T>`
[src]

Returns a mutable reference to the inner `Vec` if there are currently no other copies of this `Qutex`.

Since this call borrows the inner lock mutably, no actual locking needs to take place---the mutable borrow statically guarantees no locks exist.

#### `pub fn as_ptr(&self) -> *const T`
[src]

Returns a reference to the inner value.

#### `pub fn as_mut_ptr(&self) -> *mut T`
[src]

Returns a mutable reference to the inner value.

#### `pub unsafe fn process_queue(&self)`
[src]

Pops the next lock request in the queue if this (the caller's) lock is unlocked.

#### `pub unsafe fn direct_unlock(&self)`
[src]

Unlocks this (the caller's) lock and wakes up the next task in the queue.

## Trait Implementations

### `impl<T: Debug> Debug for Qutex<T>`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

### `impl<T> From<T> for Qutex<T>`
[src]

#### `fn from(val: T) -> Qutex<T>`
[src]

Performs the conversion.

### `impl<T> Clone for Qutex<T>`
[src]

#### `fn clone(&self) -> Qutex<T>`
[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0
[src]

Performs copy-assignment from `source`. Read more

# 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`)