pub fn into_inner(self) -> LockResult<T> where T: Sized {
        // We know statically that there are no outstanding references to
        // `self` so there's no need to lock the inner StaticRwLock.
        //
        // To get the inner value, we'd like to call `data.into_inner()`,
        // but because `RwLock` impl-s `Drop`, we can't move out of it, so
        // we'll have to destructure it manually instead.
        unsafe {
            // Like `let RwLock { inner, data } = self`.
            let (inner, data) = {
                let RwLock { ref inner, ref data } = self;
                (ptr::read(inner), ptr::read(data))
            };
            mem::forget(self);
            inner.lock.destroy();  // Keep in sync with the `Drop` impl.

            poison::map_result(inner.poison.borrow(), |_| data.into_inner())
        }
    }
/// Consumes this `RwLock`, returning the underlying data.
///
/// # Failure
///
/// This function will return an error if the RwLock is poisoned. An RwLock
/// is poisoned whenever a writer panics while holding an exclusive lock. An
/// error will only be returned if the lock would have otherwise been
/// acquired.
Consumes this `RwLock`, returning the underlying data.
Consumes this ` RwLock ` returning the underlying data .
pub fn into_inner(self) -> LockResult<T> where T: Sized {
        // We know statically that there are no outstanding references to
        // `self` so there's no need to lock the inner StaticRwLock.
        //
        // To get the inner value, we'd like to call `data.into_inner()`,
        // but because `RwLock` impl-s `Drop`, we can't move out of it, so
        // we'll have to destructure it manually instead.
        unsafe {
            // Like `let RwLock { inner, data } = self`.
            let (inner, data) = {
                let RwLock { ref inner, ref data } = self;
                (ptr::read(inner), ptr::read(data))
            };
            mem::forget(self);
            inner.lock.destroy();  // Keep in sync with the `Drop` impl.
            poison::map_result(inner.poison.borrow(), |_| data.into_inner())
        }
    }
pub fn into_inner ( self ) -> LockResult < T > where T : Sized { // We know statically that there are no outstanding references to // `self` so there's no need to lock the inner StaticRwLock. // // To get the inner value, we'd like to call `data.into_inner()`, // but because `RwLock` impl-s `Drop`, we can't move out of it, so // we'll have to destructure it manually instead. unsafe { // Like `let RwLock { inner, data } = self`. let ( inner , data ) = { let RwLock { ref inner , ref data } = self ; ( ptr :: read ( inner ) , ptr :: read ( data ) ) } ; mem :: forget ( self ) ; inner . lock . destroy ( ) ; // Keep in sync with the `Drop` impl. poison :: map_result ( inner . poison . borrow ( ) , | _ | data . into_inner ( ) ) } }
Consumes this `RwLock`, returning the underlying data.
Consumes this ` RwLock ` returning the underlying data .
self
self
failure
This function will return an error if the RwLock is poisoned. An RwLock
is poisoned whenever a writer panics while holding an exclusive lock. An
error will only be returned if the lock would have otherwise been
acquired.
This function will return an error if the RwLock is poisoned . An RwLock is poisoned whenever a writer panics while holding an exclusive lock . An error will only be returned if the lock would have otherwise been acquired .