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 StaticMutex.
        //
        // To get the inner value, we'd like to call `data.into_inner()`,
        // but because `Mutex` impl-s `Drop`, we can't move out of it, so
        // we'll have to destructure it manually instead.
        unsafe {
            // Like `let Mutex { inner, data } = self`.
            let (inner, data) = {
                let Mutex { 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 mutex, returning the underlying data.
///
/// # Failure
///
/// If another user of this mutex panicked while holding the mutex, then
/// this call will return an error instead.
Consumes this mutex, returning the underlying data.
Consumes this mutex 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 StaticMutex.
        //
        // To get the inner value, we'd like to call `data.into_inner()`,
        // but because `Mutex` impl-s `Drop`, we can't move out of it, so
        // we'll have to destructure it manually instead.
        unsafe {
            // Like `let Mutex { inner, data } = self`.
            let (inner, data) = {
                let Mutex { 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 StaticMutex. // // To get the inner value, we'd like to call `data.into_inner()`, // but because `Mutex` impl-s `Drop`, we can't move out of it, so // we'll have to destructure it manually instead. unsafe { // Like `let Mutex { inner, data } = self`. let ( inner , data ) = { let Mutex { 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 mutex, returning the underlying data.
Consumes this mutex returning the underlying data .
self
self
failure
If another user of this mutex panicked while holding the mutex, then
this call will return an error instead.
If another user of this mutex panicked while holding the mutex then this call will return an error instead .