#[non_exhaustive]pub enum HandleError {
NotSupported,
Unavailable,
}
Expand description
An error that can occur while fetching a display or window handle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotSupported
The underlying handle cannot be represented using the types in this crate.
This may be returned if the underlying window system does not support any of the
representative C window handles in this crate. For instance, if you were using a pure Rust
library to set up X11 (like x11rb
), you would not be able to use any of the
RawWindowHandle
variants, as they all represent C types.
Another example would be a system that isn’t supported by raw-window-handle
yet,
like some game consoles.
In the event that this error is returned, you should try to use the underlying window system’s native API to get the handle you need.
The underlying handle is not available.
In some cases the underlying window handle may become temporarily unusable. For example, on Android, the native window pointer can arbitrarily be replaced or removed by the system. In this case, returning a window handle would be disingenuous, as it would not be usable. A similar situation can occur on Wayland for the layer shell windows.
In the event that this error is returned, you should wait until the handle becomes available again.
Trait Implementations§
source§impl Clone for HandleError
impl Clone for HandleError
source§fn clone(&self) -> HandleError
fn clone(&self) -> HandleError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HandleError
impl Debug for HandleError
source§impl Display for HandleError
impl Display for HandleError
source§impl Error for HandleError
impl Error for HandleError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for HandleError
impl RefUnwindSafe for HandleError
impl Send for HandleError
impl Sync for HandleError
impl Unpin for HandleError
impl UnwindSafe for HandleError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)