#[non_exhaustive]pub enum ExceptionCode {
IllegalFunction,
IllegalDataAddress,
IllegalDataValue,
ServerDeviceFailure,
Acknowledge,
ServerDeviceBusy,
MemoryParityError,
GatewayPathUnavailable,
GatewayTargetFailedToRespond,
Unknown(u8),
}Expand description
Modbus exception codes returned by a device to indicate an error.
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.
IllegalFunction
0x01 — The function code is not supported.
IllegalDataAddress
0x02 — The data address is not valid.
IllegalDataValue
0x03 — The data value is not valid.
ServerDeviceFailure
0x04 — An unrecoverable error occurred on the server.
Acknowledge
0x05 — The request has been accepted but will take time to process.
ServerDeviceBusy
0x06 — The server is busy processing another request.
MemoryParityError
0x08 — Memory parity error detected.
0x0A — The gateway path is not available.
GatewayTargetFailedToRespond
0x0B — The gateway target device failed to respond.
Unknown(u8)
An exception code not defined in the standard.
Implementations§
Source§impl ExceptionCode
impl ExceptionCode
Trait Implementations§
Source§impl Clone for ExceptionCode
impl Clone for ExceptionCode
Source§fn clone(&self) -> ExceptionCode
fn clone(&self) -> ExceptionCode
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 ExceptionCode
impl Debug for ExceptionCode
Source§impl Display for ExceptionCode
impl Display for ExceptionCode
Source§impl PartialEq for ExceptionCode
impl PartialEq for ExceptionCode
impl Copy for ExceptionCode
impl Eq for ExceptionCode
impl StructuralPartialEq for ExceptionCode
Auto Trait Implementations§
impl Freeze for ExceptionCode
impl RefUnwindSafe for ExceptionCode
impl Send for ExceptionCode
impl Sync for ExceptionCode
impl Unpin for ExceptionCode
impl UnsafeUnpin for ExceptionCode
impl UnwindSafe for ExceptionCode
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