pub enum UartError {
GenericError,
PortBusy,
IoError {
cause: ErrorKind,
description: String,
},
SerialError {
cause: ErrorKind,
description: String,
},
}
Expand description
Custom errors for UART actions
Variants
GenericError
Catch-all error case
PortBusy
A read/write call was made while another call was already in-progress
IoError
An I/O error was thrown by the kernel
SerialError
An error was thrown by the serial driver
Trait Implementations
sourceimpl Fail for UartError
impl Fail for UartError
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
impl Eq for UartError
impl StructuralEq for UartError
impl StructuralPartialEq for UartError
Auto Trait Implementations
impl RefUnwindSafe for UartError
impl Send for UartError
impl Sync for UartError
impl Unpin for UartError
impl UnwindSafe for UartError
Blanket Implementations
impl<T> AsFail for T where
T: Fail,
impl<T> AsFail for T where
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to Self
into a dynamic trait object of Fail
.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more