Trait raw_window_handle::HasRawWindowHandle
source · [−]pub unsafe trait HasRawWindowHandle {
fn raw_window_handle(&self) -> RawWindowHandle;
}
Expand description
Window that wraps around a raw window handle.
Safety guarantees
Users can safely assume that non-null
/0
fields are valid handles, and it is up to the
implementer of this trait to ensure that condition is upheld.
Despite that qualification, implementers should still make a best-effort attempt to fill in all available fields. If an implementation doesn’t, and a downstream user needs the field, it should try to derive the field from other fields the implementer does provide via whatever methods the platform provides.
The exact handles returned by raw_window_handle
must remain consistent between multiple calls
to raw_window_handle
as long as not indicated otherwise by platform specific events.
Required methods
fn raw_window_handle(&self) -> RawWindowHandle
Implementations on Foreign Types
sourceimpl<'a, T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for &'a T
impl<'a, T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for &'a T
fn raw_window_handle(&self) -> RawWindowHandle
sourceimpl<T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for Rc<T>
This is supported on crate feature alloc
only.
impl<T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for Rc<T>
This is supported on crate feature
alloc
only.fn raw_window_handle(&self) -> RawWindowHandle
sourceimpl<T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for Arc<T>
This is supported on crate feature alloc
only.
impl<T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for Arc<T>
This is supported on crate feature
alloc
only.