pub unsafe fn from_mut<T>(data: &mut T) -> Self
    where
        T: Any,
    {
        Self {
            vtable: &AnyObjVtable {
                kind: AnyObjKind::MutPtr,
                drop: noop_drop_impl::<T>,
                as_ptr: as_ptr_impl::<T>,
                debug: debug_mut_impl::<T>,
                type_name: type_name_impl::<T>,
                type_hash: type_hash_impl::<T>,
            },
            data: data as *const _ as *const (),
        }
    }
/// Construct an Any that wraps a mutable pointer.
///
/// # Safety
///
/// Caller must ensure that the returned `AnyObj` doesn't outlive the
/// reference it is wrapping.
///
/// This would be an example of incorrect use:
///
/// ```no_run
/// use runestick::{Any, AnyObj};
///
/// #[derive(Any)]
/// struct Foo(u32);
///
/// let mut v = Foo(1u32);
/// let any = unsafe { AnyObj::from_mut(&mut v) };
///
/// drop(v);
///
/// // any use of `any` beyond here is undefined behavior.
/// ```
///
/// # Examples
///
/// ```
/// use runestick::{Any, AnyObj};
///
/// #[derive(Any)]
/// struct Foo(u32);
///
/// let mut v = Foo(1u32);
///
/// {
///     let mut any = unsafe { AnyObj::from_mut(&mut v) };
///
///     if let Some(v) = any.downcast_borrow_mut::<Foo>() {
///         v.0 += 1;
///     }
/// }
///
/// assert_eq!(v.0, 2);
/// ```
Construct an Any that wraps a mutable pointer.
Construct an Any that wraps a mutable pointer .
pub unsafe fn from_mut<T>(data: &mut T) -> Self
    where
        T: Any,
    {
        Self {
            vtable: &AnyObjVtable {
                kind: AnyObjKind::MutPtr,
                drop: noop_drop_impl::<T>,
                as_ptr: as_ptr_impl::<T>,
                debug: debug_mut_impl::<T>,
                type_name: type_name_impl::<T>,
                type_hash: type_hash_impl::<T>,
            },
            data: data as *const _ as *const (),
        }
    }
pub unsafe fn from_mut < T > ( data : & mut T ) -> Self where T : Any , { Self { vtable : & AnyObjVtable { kind : AnyObjKind :: MutPtr , drop : noop_drop_impl :: < T > , as_ptr : as_ptr_impl :: < T > , debug : debug_mut_impl :: < T > , type_name : type_name_impl :: < T > , type_hash : type_hash_impl :: < T > , } , data : data as * const _ as * const ( ) , } }
Construct an Any that wraps a mutable pointer.
Construct an Any that wraps a mutable pointer .
data
&mut T
data
&mut T
safety
Caller must ensure that the returned `AnyObj` doesn't outlive the
reference it is wrapping.

This would be an example of incorrect use.

```no_run
use runestick::{Any, AnyObj}.
Caller must ensure that the returned ` AnyObj ` doesn ' t outlive the reference it is wrapping . This would be an example of incorrect use . ` ` ` no_run use runestick :: { Any AnyObj } .
[derive(any)]
struct Foo(u32).

let mut v = Foo(1u32);
let any = unsafe { AnyObj::from_mut(&mut v) }.



any use of `any` beyond here is undefined behavior.
struct Foo ( u32 ) . let mut v = Foo ( 1u32 ) ; let any = unsafe { AnyObj :: from_mut ( &mut v ) } . any use of ` any ` beyond here is undefined behavior .
examples
```
use runestick::{Any, AnyObj}.
` ` ` use runestick :: { Any AnyObj } .
[derive(any)]
struct Foo(u32).



{
let mut any = unsafe { AnyObj::from_mut(&mut v) }.




struct Foo ( u32 ) . { let mut any = unsafe { AnyObj :: from_mut ( &mut v ) } .