pub unsafe fn new(ptr: *mut *mut <T as ComInterface>::VTable) -> ComPtr<T> {
        ComPtr {
            ptr: NonNull::new(ptr).expect("ComPtr's ptr was null"),
            phantom: PhantomData,
        }
    }
/// Creates a new `ComPtr` that comforms to the interface T
///
/// # Safety
///
/// `ptr` must be a valid interface pointer for interface `T`. An interface
/// pointer as the name suggests points to an interface struct. A valid
/// interface is itself trivial castable to a `*mut T::VTable`. In other words,
/// `ptr` should also be equal to `*mut *mut T::VTable`
///
/// `ptr` must live for at least as long as the `ComPtr`. The underlying
/// COM interface is assumed to correctly implement AddRef and Release such that
/// the interface will be valid as long as AddRef has been called more times than
/// Release.
///
/// AddRef must have been called on the underlying COM interface that `ptr` is pointing
/// to such that the reference count must be at least 1. It is expected that Release
/// will eventually be called on this pointer either manually or by passing it into
/// `ComRc::new` which will cause Release to be called on drop of the rc.
///
/// When this struct is dropped, `release` will be called on the underlying interface.
///
/// # Panics
///
/// Panics if `ptr` is null
Creates a new `ComPtr` that comforms to the interface T
Creates a new ` ComPtr ` that comforms to the interface T
pub unsafe fn new(ptr: *mut *mut <T as ComInterface>::VTable) -> ComPtr<T> {
        ComPtr {
            ptr: NonNull::new(ptr).expect("ComPtr's ptr was null"),
            phantom: PhantomData,
        }
    }
pub unsafe fn new ( ptr : * mut * mut < T as ComInterface > :: VTable ) -> ComPtr < T > { ComPtr { ptr : NonNull :: new ( ptr ) . expect ( " " ) , phantom : PhantomData , } }
Creates a new `ComPtr` that comforms to the interface T
Creates a new ` ComPtr ` that comforms to the interface T
ptr
*mut *mut <T as ComInterface>::VTable
ptr
*mut *mut <T as ComInterface>::VTable
safety
`ptr` must be a valid interface pointer for interface `T`. An interface
pointer as the name suggests points to an interface struct. A valid
interface is itself trivial castable to a `*mut T::VTable`. In other words,
`ptr` should also be equal to `*mut *mut T::VTable`

`ptr` must live for at least as long as the `ComPtr`. The underlying
COM interface is assumed to correctly implement AddRef and Release such that
the interface will be valid as long as AddRef has been called more times than
Release.

AddRef must have been called on the underlying COM interface that `ptr` is pointing
to such that the reference count must be at least 1. It is expected that Release
will eventually be called on this pointer either manually or by passing it into
`ComRc::new` which will cause Release to be called on drop of the rc.

When this struct is dropped, `release` will be called on the underlying interface.
` ptr ` must be a valid interface pointer for interface ` T ` . An interface pointer as the name suggests points to an interface struct . A valid interface is itself trivial castable to a ` * mut T :: VTable ` . In other words ` ptr ` should also be equal to ` * mut * mut T :: VTable ` ` ptr ` must live for at least as long as the ` ComPtr ` . The underlying COM interface is assumed to correctly implement AddRef and Release such that the interface will be valid as long as AddRef has been called more times than Release . AddRef must have been called on the underlying COM interface that ` ptr ` is pointing to such that the reference count must be at least 1 . It is expected that Release will eventually be called on this pointer either manually or by passing it into ` ComRc :: new ` which will cause Release to be called on drop of the rc . When this struct is dropped ` release ` will be called on the underlying interface .
panics
Panics if `ptr` is null
Panics if ` ptr ` is null