Enum rodbus::AduParseError
source · pub enum AduParseError {
InsufficientBytes,
InsufficientBytesForByteCount(usize, usize),
TrailingBytes(usize),
ReplyEchoMismatch,
UnknownResponseFunction(u8, u8, u8),
UnknownCoilState(u16),
}Expand description
Errors that occur while parsing requests and responses
Variants§
InsufficientBytes
Response is too short to be valid
InsufficientBytesForByteCount(usize, usize)
Byte count doesn’t match the actual number of bytes present
TrailingBytes(usize)
Response contains extra trailing bytes
ReplyEchoMismatch
Parameter expected to be echoed in the reply did not match
UnknownResponseFunction(u8, u8, u8)
Unknown response function code was received
UnknownCoilState(u16)
Bad value for the coil state
Trait Implementations§
source§impl Clone for AduParseError
impl Clone for AduParseError
source§fn clone(&self) -> AduParseError
fn clone(&self) -> AduParseError
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 AduParseError
impl Debug for AduParseError
source§impl Display for AduParseError
impl Display for AduParseError
source§impl Error for AduParseError
impl Error for AduParseError
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 Ord for AduParseError
impl Ord for AduParseError
source§fn cmp(&self, other: &AduParseError) -> Ordering
fn cmp(&self, other: &AduParseError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<AduParseError> for AduParseError
impl PartialEq<AduParseError> for AduParseError
source§fn eq(&self, other: &AduParseError) -> bool
fn eq(&self, other: &AduParseError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<AduParseError> for AduParseError
impl PartialOrd<AduParseError> for AduParseError
source§fn partial_cmp(&self, other: &AduParseError) -> Option<Ordering>
fn partial_cmp(&self, other: &AduParseError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more