#[non_exhaustive]pub enum ClientError {
Io(Error),
Protocol(Error),
Rejected {
result: AssociationResult,
diagnostic: Diagnostic,
},
Exception(ExceptionResponse),
Refused(DataAccessResult),
ActionFailed(ActionResult),
ResponseTooLarge {
limit: usize,
reconnect_required: bool,
},
ReleaseRefused(ReleaseResponseReason),
NotAssociated,
Unexpected,
}Expand description
Everything a Client call can fail with.
Every arm carries codes, results and offsets — never key material or a decrypted payload — so an error can be logged as it is.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
The transport failed: a socket error, a timeout, a peer that closed the link.
Protocol(Error)
A malformed, unexpected or unverifiable APDU; the byte offset says where.
Rejected
The meter refused the association.
Exception(ExceptionResponse)
The meter refused the APDU itself. For a ciphered association the commonest cause
is a stale invocation counter, and then expected_invocation_counter names the
value to move to.
Refused(DataAccessResult)
The meter refused a read or a write.
ActionFailed(ActionResult)
A method did not run.
ResponseTooLarge
The response exceeded the configured byte budget.
Fields
ReleaseRefused(ReleaseResponseReason)
The meter answered the release but did not release: its reason.
NotAssociated
The association has already ended on this side, after a transfer that had to be abandoned. Nothing was sent. Connect again.
Unexpected
A response of a kind the request cannot have.
Trait Implementations§
Source§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
Source§impl Error for ClientError
impl Error for ClientError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()