Struct v9::lock::Locked[][src]

pub struct Locked {
    pub obj: UnsafeCell<Box<dyn Any>>,
    pub state: LockState,
    pub name: Name,
}

Fields

obj: UnsafeCell<Box<dyn Any>>state: LockStatename: Name

Implementations

impl Locked[src]

pub fn new(obj: Box<dyn Any>, name: Name) -> Box<Self>[src]

pub fn is_poisoned(&self) -> bool[src]

pub fn can(&self, access: Access) -> bool[src]

pub fn acquire(&mut self, access: Access)[src]

pub fn release(&mut self, access: Access)[src]

pub unsafe fn contents(&mut self) -> *mut dyn Any[src]

pub unsafe fn read(&mut self) -> GuardRef[src]

pub unsafe fn write(&mut self) -> GuardMut[src]

pub fn into_inner(self) -> Box<dyn Any>[src]

Trait Implementations

impl Debug for Locked[src]

impl Drop for Locked[src]

Auto Trait Implementations

impl !RefUnwindSafe for Locked

impl !Send for Locked

impl !Sync for Locked

impl Unpin for Locked

impl !UnwindSafe for Locked

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<X> ForeignKey for X[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.