#[non_exhaustive]pub enum CursorError {
InvalidName,
NoThemes,
NotFound,
Malformed,
TooLarge,
NoImages,
InvalidImage,
Io(String),
NoPlane,
Unsupported,
MissingProperty,
PlaneUnusable,
}Expand description
What can go wrong finding a cursor.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidName
The cursor name is empty, ., .., or contains a path separator.
A cursor name is an identifier, not a path. Refusing the ambiguous cases keeps a caller-supplied name from composing into somewhere else on the filesystem.
NoThemes
No cursor theme directory was readable at all.
Distinct from CursorError::NotFound: this one means nothing is
installed, which is a different thing to say to a user.
NotFound
No theme on the search path has this cursor.
Malformed
The file is not a cursor, is truncated, or contradicts itself.
TooLarge
The file declares more frames, or larger frames, than are accepted.
Separate from CursorError::Malformed because such a file may be
perfectly well-formed – it is refused for being unreasonable, not for
being broken, and that is worth saying differently.
NoImages
The file parsed but holds no images.
InvalidImage
Caller-supplied pixels do not describe an image.
Io(String)
A file read or an ioctl failed: the cursor file, a buffer allocation, a property read, or a commit. Carries the underlying error’s text.
NoPlane
No plane on this CRTC can carry a cursor, and legacy was not allowed.
Unsupported
The only available path cannot carry this cursor.
Today that means legacy drmModeSetCursor, on a controller with no
cursor hardware at all, or with a rotation the legacy call cannot
express. A caller told this can composite a
cursor instead, which beats a renderer that fails on its first show.
MissingProperty
The plane is missing a property every plane is required to have.
A broken driver rather than anything a caller did.
PlaneUnusable
A caller-named plane does not exist, cannot feed this CRTC, or can take
none of CURSOR_FORMATS.
Distinct from CursorError::NoPlane: the caller overrode the policy
and the override does not work. Falling back silently would leave them
on a plane they did not ask for.
Trait Implementations§
Source§impl Clone for CursorError
impl Clone for CursorError
Source§impl Debug for CursorError
impl Debug for CursorError
Source§impl Display for CursorError
impl Display for CursorError
impl Eq for CursorError
Source§impl Error for CursorError
impl Error for CursorError
1.30.0 · 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()