pub trait ComWrapper {
type Interface: Interface;
// Required methods
unsafe fn get_raw(&self) -> *mut Self::Interface;
unsafe fn into_raw(self) -> *mut Self::Interface;
unsafe fn from_raw(raw: *mut Self::Interface) -> Self;
unsafe fn from_ptr(ptr: ComPtr<Self::Interface>) -> Self;
unsafe fn into_ptr(self) -> ComPtr<Self::Interface>;
}
Required Associated Types§
Required Methods§
Sourceunsafe fn get_raw(&self) -> *mut Self::Interface
unsafe fn get_raw(&self) -> *mut Self::Interface
Gets a raw pointer to the interface. Does not increment the reference count
Sourceunsafe fn into_raw(self) -> *mut Self::Interface
unsafe fn into_raw(self) -> *mut Self::Interface
Consumes the wrapper without affecting the reference count
Sourceunsafe fn from_raw(raw: *mut Self::Interface) -> Self
unsafe fn from_raw(raw: *mut Self::Interface) -> Self
Creates a wrapper from the raw pointer. Takes ownership of the pointer for reference counting purposes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.