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.
Trait Implementations§
source§impl Debug for SoftBufferError
impl Debug for SoftBufferError
source§impl Display for SoftBufferError
impl Display for SoftBufferError
source§impl Error for SoftBufferError
impl Error for SoftBufferError
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
source§impl From<HandleError> for SoftBufferError
impl From<HandleError> for SoftBufferError
source§fn from(err: HandleError) -> Self
fn from(err: HandleError) -> Self
Auto Trait Implementations§
impl Freeze for SoftBufferError
impl !RefUnwindSafe for SoftBufferError
impl !Send for SoftBufferError
impl !Sync for SoftBufferError
impl Unpin for SoftBufferError
impl !UnwindSafe for SoftBufferError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.