Enum rodbus::FrameParseError
source · pub enum FrameParseError {
MbapLengthZero,
FrameLengthTooBig(usize, usize),
UnknownProtocolId(u16),
UnknownFunctionCode(u8),
CrcValidationFailure(u16, u16),
}Expand description
Errors that occur while parsing a frame off a stream (TCP or serial)
Variants§
MbapLengthZero
Received TCP frame with the length field set to zero
FrameLengthTooBig(usize, usize)
Received TCP or RTU frame with length that exceeds max allowed size
UnknownProtocolId(u16)
Received TCP frame within non-Modbus protocol id
UnknownFunctionCode(u8)
Unknown function code (only emitted in RTU parsing)
CrcValidationFailure(u16, u16)
RTU CRC validation failed
Trait Implementations§
source§impl Clone for FrameParseError
impl Clone for FrameParseError
source§fn clone(&self) -> FrameParseError
fn clone(&self) -> FrameParseError
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 FrameParseError
impl Debug for FrameParseError
source§impl Display for FrameParseError
impl Display for FrameParseError
source§impl Error for FrameParseError
impl Error for FrameParseError
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<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 Ord for FrameParseError
impl Ord for FrameParseError
source§fn cmp(&self, other: &FrameParseError) -> Ordering
fn cmp(&self, other: &FrameParseError) -> 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<FrameParseError> for FrameParseError
impl PartialEq<FrameParseError> for FrameParseError
source§fn eq(&self, other: &FrameParseError) -> bool
fn eq(&self, other: &FrameParseError) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<FrameParseError> for FrameParseError
impl PartialOrd<FrameParseError> for FrameParseError
source§fn partial_cmp(&self, other: &FrameParseError) -> Option<Ordering>
fn partial_cmp(&self, other: &FrameParseError) -> 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