Enum ReadError
#[non_exhaustive]pub enum ReadError {
Io(Error),
Empty,
Format(FormatError),
}Expand description
Error returned by Channel::read.
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.
Io(Error)
Reading the channel file failed.
Empty
The channel file is empty.
The kernel returns no content if it fails to read the ADC. The kernel log has the cause.
Format(FormatError)
The channel file content has an invalid format.
Trait Implementations§
§impl Error for ReadError
impl Error for ReadError
§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()
§impl From<FormatError> for ReadError
impl From<FormatError> for ReadError
§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ReadError
impl !UnwindSafe for ReadError
impl Freeze for ReadError
impl Send for ReadError
impl Sync for ReadError
impl Unpin for ReadError
impl UnsafeUnpin for ReadError
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