Enum rodbus::RequestError
source · pub enum RequestError {
Io(ErrorKind),
Exception(ExceptionCode),
BadRequest(InvalidRequest),
BadFrame(FrameParseError),
BadResponse(AduParseError),
Internal(InternalError),
ResponseTimeout,
NoConnection,
Shutdown,
}Expand description
Top level error type for the client API
Variants§
Io(ErrorKind)
An I/O error occurred
Exception(ExceptionCode)
A Modbus exception was returned by the server
BadRequest(InvalidRequest)
Request was not performed because it is invalid
BadFrame(FrameParseError)
Unable to parse a frame from the server
BadResponse(AduParseError)
Response ADU was invalid
Internal(InternalError)
An internal error occurred in the library itself
These errors should never happen, but are trapped here for reporting purposes in case they ever do occur
ResponseTimeout
Timeout occurred before receiving a response from the server
NoConnection
No connection could be made to the Modbus server
Shutdown
Task processing requests has been shutdown
Trait Implementations§
source§impl Clone for RequestError
impl Clone for RequestError
source§fn clone(&self) -> RequestError
fn clone(&self) -> RequestError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for RequestError
impl Debug for RequestError
source§impl Display for RequestError
impl Display for RequestError
source§impl Error for RequestError
impl Error for RequestError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<AduParseError> for RequestError
impl From<AduParseError> for RequestError
source§fn from(err: AduParseError) -> Self
fn from(err: AduParseError) -> Self
Converts to this type from the input type.
source§impl From<Error> for RequestError
impl From<Error> for RequestError
source§impl From<ExceptionCode> for RequestError
impl From<ExceptionCode> for RequestError
source§fn from(err: ExceptionCode) -> Self
fn from(err: ExceptionCode) -> Self
Converts to this type from the input type.
source§impl From<FrameParseError> for RequestError
impl From<FrameParseError> for RequestError
source§fn from(err: FrameParseError) -> Self
fn from(err: FrameParseError) -> Self
Converts to this type from the input type.
source§impl From<InternalError> for RequestError
impl From<InternalError> for RequestError
source§fn from(err: InternalError) -> Self
fn from(err: InternalError) -> Self
Converts to this type from the input type.
source§impl From<InvalidRange> for RequestError
impl From<InvalidRange> for RequestError
source§fn from(x: InvalidRange) -> Self
fn from(x: InvalidRange) -> Self
Converts to this type from the input type.
source§impl From<InvalidRequest> for RequestError
impl From<InvalidRequest> for RequestError
source§fn from(err: InvalidRequest) -> Self
fn from(err: InvalidRequest) -> Self
Converts to this type from the input type.
source§impl From<ReadError> for RequestError
impl From<ReadError> for RequestError
source§impl From<RecvError> for RequestError
impl From<RecvError> for RequestError
source§impl<T> From<SendError<T>> for RequestError
impl<T> From<SendError<T>> for RequestError
source§impl From<TrailingBytes> for RequestError
impl From<TrailingBytes> for RequestError
source§fn from(x: TrailingBytes) -> Self
fn from(x: TrailingBytes) -> Self
Converts to this type from the input type.
source§impl From<WriteError> for RequestError
impl From<WriteError> for RequestError
source§fn from(err: WriteError) -> Self
fn from(err: WriteError) -> Self
Converts to this type from the input type.
source§impl PartialEq<RequestError> for RequestError
impl PartialEq<RequestError> for RequestError
source§fn eq(&self, other: &RequestError) -> bool
fn eq(&self, other: &RequestError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.