#[non_exhaustive]pub enum TransportError {
SetupTimeout,
ReplyTimeout,
WrongTcId {
got: u8,
expected: u8,
},
ModuleError,
Malformed,
ReassemblyOverflow,
OutboundQueueFull,
SpduTooLarge {
len: usize,
},
}Expand description
Transport-layer errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SetupTimeout
No C_T_C_Reply within the reply timeout (§A.4 timeout arc).
ReplyTimeout
A C_TPDU (poll or data block) sent while Active went unanswered
past the reply timeout (§A.4 timeout arc, applied to the Active
state rather than only connection setup).
WrongTcId
A reply arrived for a different t_c_id than ours.
ModuleError
The module reported a T_C_Error.
Malformed
A frame could not be parsed as an R_TPDU.
ReassemblyOverflow
A chained T_Data_More* reassembly exceeded MAX_REASSEMBLY_LEN
without a terminating T_Data_Last — the partial reassembly is
dropped rather than retained (a well-behaved module chains a bounded
number of fragments; this guards a stuck or hostile one from growing
host memory without limit).
OutboundQueueFull
Transport::send_spdu was called with MAX_OUTBOUND_QUEUE SPDUs
already queued — the caller is producing faster than the half-duplex
link can drain (one block per module turn); queueing further would
grow unboundedly. The new SPDU is dropped; the caller should retry
once earlier sends have drained.
SpduTooLarge
Transport::send_spdu was called with an SPDU longer than
MAX_SPDU_LEN — it cannot be wrapped in a single T_Data_Last
CommandTpdu (length_field’s own max encodable value). Previously
this was only discovered when the resulting CommandTpdu failed to
serialize, which Transport::cmd reported by panicking.
Trait Implementations§
Source§impl Clone for TransportError
impl Clone for TransportError
Source§impl Debug for TransportError
impl Debug for TransportError
Source§impl Display for TransportError
impl Display for TransportError
impl Eq for TransportError
Source§impl Error for TransportError
impl Error for TransportError
1.30.0 · 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()