#[non_exhaustive]pub enum InvalidResponseKind {
TrailingBytes,
FunctionMismatch,
EchoMismatch,
PayloadLengthMismatch,
PayloadTruncated,
Other(&'static str),
}Expand description
Describes why a Modbus response was considered invalid.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TrailingBytes
Extra bytes remain after decoding the response PDU.
FunctionMismatch
The response function code does not match the request.
EchoMismatch
A write response did not echo the expected address/value.
PayloadLengthMismatch
The response byte count does not match the requested quantity.
PayloadTruncated
The response payload was shorter than expected.
Other(&'static str)
Catch-all for other validation failures.
Trait Implementations§
Source§impl Clone for InvalidResponseKind
impl Clone for InvalidResponseKind
Source§fn clone(&self) -> InvalidResponseKind
fn clone(&self) -> InvalidResponseKind
Returns a duplicate 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 InvalidResponseKind
impl Debug for InvalidResponseKind
Source§impl Display for InvalidResponseKind
impl Display for InvalidResponseKind
Source§impl PartialEq for InvalidResponseKind
impl PartialEq for InvalidResponseKind
impl Eq for InvalidResponseKind
impl StructuralPartialEq for InvalidResponseKind
Auto Trait Implementations§
impl Freeze for InvalidResponseKind
impl RefUnwindSafe for InvalidResponseKind
impl Send for InvalidResponseKind
impl Sync for InvalidResponseKind
impl Unpin for InvalidResponseKind
impl UnsafeUnpin for InvalidResponseKind
impl UnwindSafe for InvalidResponseKind
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