pub unsafe fn from_mut<T>(data: &mut T) -> (Self, SharedPointerGuard)
    where
        T: Any,
    {
        Self::unsafe_from_any_pointer(AnyObj::from_mut(data))
    }
/// Construct a `Shared<Any>` from a mutable pointer, that will be "taken"
/// once the returned guard is dropped.
///
/// # Safety
///
/// The reference must be valid for the duration of the guard.
///
/// # Examples
///
/// ```rust
/// use runestick::{Any, Shared};
///
/// #[derive(Any)]
/// struct Thing(u32);
///
/// let mut value = Thing(10u32);
///
/// unsafe {
///     let (shared, guard) = Shared::from_mut(&mut value);
///     shared.downcast_borrow_mut::<Thing>().unwrap().0 = 20;
///
///     assert_eq!(20u32, shared.downcast_borrow_mut::<Thing>().unwrap().0);
///     assert_eq!(20u32, shared.downcast_borrow_ref::<Thing>().unwrap().0);
///
///     drop(guard);
///
///     assert!(shared.downcast_borrow_mut::<Thing>().is_err());
///     assert!(shared.downcast_borrow_ref::<Thing>().is_err());
/// }
/// ```
Construct a `Shared` from a mutable pointer, that will be "taken"
once the returned guard is dropped.
Construct a ` Shared ` from a mutable pointer that will be " taken " once the returned guard is dropped .
pub unsafe fn from_mut<T>(data: &mut T) -> (Self, SharedPointerGuard)
    where
        T: Any,
    {
        Self::unsafe_from_any_pointer(AnyObj::from_mut(data))
    }
pub unsafe fn from_mut < T > ( data : & mut T ) -> ( Self , SharedPointerGuard ) where T : Any , { Self :: unsafe_from_any_pointer ( AnyObj :: from_mut ( data ) ) }
Construct a `Shared<Any>` from a mutable pointer, that will be "taken"
once the returned guard is dropped.
Construct a ` Shared<Any > ` from a mutable pointer that will be " taken " once the returned guard is dropped .
data
&mut T
data
&mut T
safety
The reference must be valid for the duration of the guard.
The reference must be valid for the duration of the guard .
examples
```rust
use runestick::{Any, Shared}.
` ` ` rust use runestick :: { Any Shared } .
[derive(any)]
struct Thing(u32).

let mut value = Thing(10u32).

unsafe {
let (shared, guard) = Shared::from_mut(&mut value);
shared.downcast_borrow_mut::().unwrap().0 = 20.



drop(guard).

assert!(shared.downcast_borrow_mut::().is_err());
assert!(shared.downcast_borrow_ref::().is_err());
}
```
struct Thing ( u32 ) . let mut value = Thing ( 10u32 ) . unsafe { let ( shared guard ) = Shared :: from_mut ( &mut value ) ; shared . downcast_borrow_mut :: () . unwrap () . 0 = 20 . drop ( guard ) . assert! ( shared . downcast_borrow_mut :: () . is_err () ) ; assert! ( shared . downcast_borrow_ref :: () . is_err () ) ; } ` ` `