pub enum Error<Io: CoreError> {
Io(Io),
UnexpectedEof,
Crc(CrcError),
UnexpectedResponse,
}Expand description
Errors that can occur when talking to a Modbus server.
Variants§
Io(Io)
IO error.
UnexpectedEof
Unexpected end of file when reading.
Crc(CrcError)
Invalid CRC checksum.
UnexpectedResponse
Unexpected response from the Modbus server.
Trait Implementations§
Source§impl<Io> Error for Error<Io>
impl<Io> Error for Error<Io>
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<E: CoreError> From<ReadExactError<E>> for Error<E>
impl<E: CoreError> From<ReadExactError<E>> for Error<E>
Source§fn from(e: ReadExactError<E>) -> Self
fn from(e: ReadExactError<E>) -> Self
Converts to this type from the input type.
Source§impl<E: CoreError> From<ValidationError> for Error<E>
impl<E: CoreError> From<ValidationError> for Error<E>
Source§fn from(e: ValidationError) -> Self
fn from(e: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Io> Freeze for Error<Io>where
Io: Freeze,
impl<Io> RefUnwindSafe for Error<Io>where
Io: RefUnwindSafe,
impl<Io> Send for Error<Io>where
Io: Send,
impl<Io> Sync for Error<Io>where
Io: Sync,
impl<Io> Unpin for Error<Io>where
Io: Unpin,
impl<Io> UnsafeUnpin for Error<Io>where
Io: UnsafeUnpin,
impl<Io> UnwindSafe for Error<Io>where
Io: UnwindSafe,
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