#[non_exhaustive]pub enum CoreError {
NotADrmDevice {
path: String,
},
NoSuchObject {
object_id: u32,
},
NoSuchProperty {
object_id: u32,
name: String,
},
NoDevice,
NotMaster,
Io(Errno),
}Expand description
Errors from device, property, and atomic-request operations.
The variants carry the same discriminants the C++ std::error_code paths
document, so a consumer bridging both implementations classifies failures
identically. EACCES in particular stays distinguishable: the scene’s
suspend-on-EACCES rule (invariant 2) depends on telling it apart from
every other commit failure, and it must never be flattened into a generic
I/O error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotADrmDevice
The path opened, but the kernel does not report it as a DRM device.
errc::no_such_device.
NoSuchObject
No properties are cached for the object.
errc::no_such_file_or_directory.
NoSuchProperty
The object has no property by that name.
errc::no_such_file_or_directory.
NoDevice
The operation needs a live descriptor and the handle has none.
errc::bad_file_descriptor. Also what an I/O error from the drm crate
becomes when it carries no errno.
NotMaster
The commit was rejected because the caller is not DRM master.
Split out from CoreError::Io deliberately: a scene suspends on this
and on nothing else (invariant 2), so burying it in a generic errno
would break the contract silently.
Io(Errno)
An underlying syscall failed.
Implementations§
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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
use the Display impl or to_string()