pub fn new<T>(data: T) -> Self
    where
        T: Any,
    {
        let data = Box::into_raw(Box::new(data));

        Self {
            vtable: &AnyObjVtable {
                kind: AnyObjKind::Owned,
                drop: drop_impl::<T>,
                as_ptr: as_ptr_impl::<T>,
                debug: debug_impl::<T>,
                type_name: type_name_impl::<T>,
                type_hash: type_hash_impl::<T>,
            },
            data: data as *mut (),
        }
    }
/// Construct a new any from the original any.
Construct a new any from the original any.
Construct a new any from the original any .
pub fn new<T>(data: T) -> Self
    where
        T: Any,
    {
        let data = Box::into_raw(Box::new(data));
        Self {
            vtable: &AnyObjVtable {
                kind: AnyObjKind::Owned,
                drop: drop_impl::<T>,
                as_ptr: as_ptr_impl::<T>,
                debug: debug_impl::<T>,
                type_name: type_name_impl::<T>,
                type_hash: type_hash_impl::<T>,
            },
            data: data as *mut (),
        }
    }
pub fn new < T > ( data : T ) -> Self where T : Any , { let data = Box :: into_raw ( Box :: new ( data ) ) ; Self { vtable : & AnyObjVtable { kind : AnyObjKind :: Owned , drop : drop_impl :: < T > , as_ptr : as_ptr_impl :: < T > , debug : debug_impl :: < T > , type_name : type_name_impl :: < T > , type_hash : type_hash_impl :: < T > , } , data : data as * mut ( ) , } }
Construct a new any from the original any.
Construct a new any from the original any .
data
T
data
T