Enum softbuffer::SoftBufferError
source · #[non_exhaustive]pub enum SoftBufferError {
RawWindowHandle(HandleError),
UnsupportedDisplayPlatform {
human_readable_display_platform_name: &'static str,
display_handle: RawDisplayHandle,
},
UnsupportedWindowPlatform {
human_readable_window_platform_name: &'static str,
human_readable_display_platform_name: &'static str,
window_handle: RawWindowHandle,
},
IncompleteWindowHandle,
IncompleteDisplayHandle,
SizeOutOfRange {
width: NonZeroU32,
height: NonZeroU32,
},
DamageOutOfRange {
rect: Rect,
},
PlatformError(Option<String>, Option<Box<dyn Error>>),
Unimplemented,
}
Expand description
A sum type of all of the errors that can occur during the operation of this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RawWindowHandle(HandleError)
A raw-window-handle
error occurred.
UnsupportedDisplayPlatform
The RawDisplayHandle
passed into Context::new
is not supported by this crate.
Fields
human_readable_display_platform_name: &'static str
The platform name of the display that was passed into Context::new
.
This is a human-readable string that describes the platform of the display that was
passed into Context::new
. The value is not guaranteed to be stable and this
exists for debugging purposes only.
display_handle: RawDisplayHandle
The RawDisplayHandle
that was passed into Context::new
.
UnsupportedWindowPlatform
The RawWindowHandle
passed into Surface::new
is not supported by this crate.
Fields
human_readable_window_platform_name: &'static str
The platform name of the window that was passed into Surface::new
.
This is a human-readable string that describes the platform of the window that was
passed into Surface::new
. The value is not guaranteed to be stable and this
exists for debugging purposes only.
human_readable_display_platform_name: &'static str
The platform name of the display used by the Context
.
It is possible for a window to be created on a different type of display than the
display that was passed into Context::new
. This is a human-readable string that
describes the platform of the display that was passed into Context::new
. The value
is not guaranteed to be stable and this exists for debugging purposes only.
window_handle: RawWindowHandle
The RawWindowHandle
that was passed into Surface::new
.
IncompleteWindowHandle
The RawWindowHandle
passed into Surface::new
is missing necessary fields.
IncompleteDisplayHandle
The RawDisplayHandle
passed into Context::new
is missing necessary fields.
SizeOutOfRange
The provided size is outside of the range supported by the backend.
Fields
width: NonZeroU32
The width that was out of range.
height: NonZeroU32
The height that was out of range.
DamageOutOfRange
The provided damage rect is outside of the range supported by the backend.
PlatformError(Option<String>, Option<Box<dyn Error>>)
A platform-specific backend error occurred.
The first field provides a human-readable description of the error. The second field provides the actual error that occurred. Note that the second field is, under the hood, a private wrapper around the actual error, preventing the user from downcasting to the actual error type.
Unimplemented
This function is unimplemented on this platform.