#[non_exhaustive]
pub enum RawWindowHandle {
UiKit(UiKitHandle),
AppKit(AppKitHandle),
Orbital(OrbitalHandle),
Xlib(XlibHandle),
Xcb(XcbHandle),
Wayland(WaylandHandle),
Win32(Win32Handle),
WinRt(WinRtHandle),
Web(WebHandle),
AndroidNdk(AndroidNdkHandle),
Haiku(HaikuHandle),
}
Expand description
An enum to simply combine the different possible raw window handle variants.
Variant Availability
Note that all variants are present on all targets (none are disabled behind
#[cfg]
s), but see the “Availability Hints” section on each variant for
some hints on where this variant might be expected.
Note that these “Availability Hints” are not normative. That is to say, a
HasRawWindowHandle
implementor is completely allowed to return something
unexpected. (For example, it’s legal for someone to return a
RawWindowHandle::Xlib
on macOS, it would just be weird, and probably
requires something like XQuartz be used).
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
UiKit(UiKitHandle)
A raw window handle for UIKit (Apple’s non-macOS windowing library).
Availability Hints
This variant is likely to be used on iOS, tvOS, (in theory) watchOS, and
Mac Catalyst ($arch-apple-ios-macabi
targets, which can notably use
UIKit or AppKit), as these are the targets that (currently) support
UIKit.
AppKit(AppKitHandle)
A raw window handle for AppKit.
Availability Hints
This variant is likely to be used on macOS, although Mac Catalyst
($arch-apple-ios-macabi
targets, which can notably use UIKit or
AppKit) can also use it despite being target_os = "ios"
.
Orbital(OrbitalHandle)
A raw window handle for the Redox operating system.
Availability Hints
This variant is used by the Orbital Windowing System in the Redox operating system.
Xlib(XlibHandle)
A raw window handle for Xlib.
Availability Hints
This variant is likely to show up anywhere someone manages to get X11 working that Xlib can be built for, which is to say, most (but not all) Unix systems.
Xcb(XcbHandle)
A raw window handle for Xcb.
Availability Hints
This variant is likely to show up anywhere someone manages to get X11 working that XCB can be built for, which is to say, most (but not all) Unix systems.
Wayland(WaylandHandle)
A raw window handle for Wayland.
Availability Hints
This variant should be expected anywhere Wayland works, which is currently some subset of unix systems.
Win32(Win32Handle)
WinRt(WinRtHandle)
Web(WebHandle)
A raw window handle for the Web.
Availability Hints
This variant is used on Wasm or asm.js targets when targeting the Web/HTML5.
AndroidNdk(AndroidNdkHandle)
Haiku(HaikuHandle)
Trait Implementations
sourceimpl Clone for RawWindowHandle
impl Clone for RawWindowHandle
sourcefn clone(&self) -> RawWindowHandle
fn clone(&self) -> RawWindowHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RawWindowHandle
impl Debug for RawWindowHandle
sourceimpl Hash for RawWindowHandle
impl Hash for RawWindowHandle
sourceimpl PartialEq<RawWindowHandle> for RawWindowHandle
impl PartialEq<RawWindowHandle> for RawWindowHandle
sourcefn eq(&self, other: &RawWindowHandle) -> bool
fn eq(&self, other: &RawWindowHandle) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RawWindowHandle) -> bool
fn ne(&self, other: &RawWindowHandle) -> bool
This method tests for !=
.
impl Copy for RawWindowHandle
impl Eq for RawWindowHandle
impl StructuralEq for RawWindowHandle
impl StructuralPartialEq for RawWindowHandle
Auto Trait Implementations
impl RefUnwindSafe for RawWindowHandle
impl !Send for RawWindowHandle
impl !Sync for RawWindowHandle
impl Unpin for RawWindowHandle
impl UnwindSafe for RawWindowHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more