Enum softbuffer::SoftBufferError
source · #[non_exhaustive]pub enum SoftBufferError {
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
UnsupportedDisplayPlatform
Fields
human_readable_display_platform_name: &'static strThe 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: RawDisplayHandleThe RawDisplayHandle that was passed into Context::new.
The RawDisplayHandle passed into Context::new is not supported by this crate.
UnsupportedWindowPlatform
Fields
human_readable_window_platform_name: &'static strThe 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 strThe 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: RawWindowHandleThe RawWindowHandle that was passed into Surface::new.
The RawWindowHandle passed into Surface::new is not supported by this crate.
IncompleteWindowHandle
The RawWindowHandle passed into Surface::new is missing necessary fields.
IncompleteDisplayHandle
The RawDisplayHandle passed into Context::new is missing necessary fields.
SizeOutOfRange
Fields
width: NonZeroU32The width that was out of range.
height: NonZeroU32The height that was out of range.
The provided size is outside of the range supported by the backend.
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.