#[non_exhaustive]pub enum GbmError {
NotGbmCapable(String),
Allocation(String),
Io(Errno),
}Expand description
What went wrong allocating or exporting.
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.
NotGbmCapable(String)
The device could not be opened as a GBM device.
Either libgbm could not be loaded – not installed, or missing an entry point this crate cannot do without – or it would not open the descriptor, which every DRM node that can allocate anything allows, so in practice that means it is not a DRM node at all. The string says which.
Allocation(String)
The driver refused the allocation.
Usually the format, the modifier set, or the usage flags: a driver
advertises what it can scan out through IN_FORMATS, and asking for
anything else fails here rather than at commit time. Also returned when
a buffer cannot be exported as a dma-buf.
Io(Errno)
The DRM descriptor could not be duplicated.
Trait Implementations§
Source§impl Error for GbmError
impl Error for GbmError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GbmError
impl RefUnwindSafe for GbmError
impl Send for GbmError
impl Sync for GbmError
impl Unpin for GbmError
impl UnsafeUnpin for GbmError
impl UnwindSafe for GbmError
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
Mutably borrows from an owned value. Read more