pub enum HdcError {
Io(Error),
Protocol(String),
HandshakeFailed(String),
NotConnected,
InvalidBanner(Vec<u8>),
BufferError(String),
CommandFailed(String),
Timeout,
DeviceNotFound(String),
Utf8(FromUtf8Error),
}Expand description
Errors that can occur during HDC operations
Variants§
Io(Error)
I/O error occurred during communication
Protocol(String)
Invalid protocol data received
HandshakeFailed(String)
Handshake failed
NotConnected
Connection not established
InvalidBanner(Vec<u8>)
Invalid banner received
BufferError(String)
Buffer size error
CommandFailed(String)
Command execution failed
Timeout
Timeout occurred
DeviceNotFound(String)
Device not found
Utf8(FromUtf8Error)
UTF-8 conversion error
Trait Implementations§
Source§impl Error for HdcError
impl Error for HdcError
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<FromUtf8Error> for HdcError
impl From<FromUtf8Error> for HdcError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HdcError
impl !RefUnwindSafe for HdcError
impl Send for HdcError
impl Sync for HdcError
impl Unpin for HdcError
impl !UnwindSafe for HdcError
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