Trait AsImpl
pub trait AsImpl<T> {
// Required method
unsafe fn as_impl_ptr(&self) -> NonNull<T>;
// Provided method
unsafe fn as_impl(&self) -> &T { ... }
}Expand description
A trait for retrieving the implementation behind a COM or WinRT interface.
This trait is automatically implemented when using the implement macro.
Required Methods§
unsafe fn as_impl_ptr(&self) -> NonNull<T>
unsafe fn as_impl_ptr(&self) -> NonNull<T>
Returns a pointer to the implementation object.
§Safety
The caller needs to ensure that self is actually implemented by the
implementation T.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".