Struct shared_mutex::poison::PoisonGuard [] [src]

pub struct PoisonGuard<'poison, T: ?Sized + 'poison> {
    // some fields omitted
}

A poison guard on an associated Poison.

If the current thread panics before this instance is dropped, the Poision will become poisoned when this instance drops.

Methods

impl<'poison, T: ?Sized> PoisonGuard<'poison, T>
[src]

fn get(&self) -> &T

Get an immutable reference to the data.

fn get_mut(&mut self) -> &mut T

Get a mutable reference to the data.

unsafe fn into_mut(self) -> &'poison mut T

Get a reference that escapes the guard.

Should only be used if the data will be externally poisoned.

fn into_raw(self) -> RawPoisonGuard<'poison>

Get the raw poison guard.