pub enum HalError {
Io(Error),
DeviceNotFound(String),
UnsupportedFormat(String),
OutOfRange(String),
Parse(String),
}Expand description
Errors returned by cr1140-hal.
Variants§
Io(Error)
An underlying OS / I/O error (open, ioctl, sysfs read/write).
DeviceNotFound(String)
A device or node could not be located (e.g. no input matched a name).
UnsupportedFormat(String)
The framebuffer is not the expected xRGB8888/32bpp layout.
OutOfRange(String)
A value was outside the hardware’s accepted range.
Parse(String)
A sysfs/procfs value could not be parsed.
Trait Implementations§
Source§impl Error for HalError
impl Error for HalError
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()
Source§impl From<HalError> for Error
Degrade a HalError back to an std::io::Error so existing
io::Result-based callers (e.g. cr1140-sdk) keep composing with ?.
The HalError::Io variant is returned as-is; the rest map to
std::io::ErrorKind::Other preserving the message.
impl From<HalError> for Error
Degrade a HalError back to an std::io::Error so existing
io::Result-based callers (e.g. cr1140-sdk) keep composing with ?.
The HalError::Io variant is returned as-is; the rest map to
std::io::ErrorKind::Other preserving the message.
Auto Trait Implementations§
impl Freeze for HalError
impl !RefUnwindSafe for HalError
impl Send for HalError
impl Sync for HalError
impl Unpin for HalError
impl UnsafeUnpin for HalError
impl !UnwindSafe for HalError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more