Enum raw_window_handle::RawWindowHandle[][src]

#[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),
}
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

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.

Tuple Fields of UiKit

0: UiKitHandle
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".

Tuple Fields of AppKit

0: AppKitHandle
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.

Tuple Fields of Orbital

0: OrbitalHandle

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.

Tuple Fields of Xlib

0: XlibHandle

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.

Tuple Fields of Xcb

0: XcbHandle
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.

Tuple Fields of Wayland

0: WaylandHandle

A raw window handle for Win32.

Availability Hints

This variant is used on Windows systems.

Tuple Fields of Win32

0: Win32Handle

A raw window handle for WinRT.

Availability Hints

This variant is used on Windows systems.

Tuple Fields of WinRt

0: WinRtHandle

A raw window handle for the Web.

Availability Hints

This variant is used on Wasm or asm.js targets when targeting the Web/HTML5.

Tuple Fields of Web

0: WebHandle
AndroidNdk(AndroidNdkHandle)

A raw window handle for Android NDK.

Availability Hints

This variant is used on Android targets.

Tuple Fields of AndroidNdk

0: AndroidNdkHandle

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.