#[non_exhaustive]pub enum SegmentationError {
ZeroSegmentSize,
TooManySegments {
segments: usize,
},
SegmentTooLarge {
size: usize,
max: usize,
},
TotalTooLarge {
total: usize,
},
MissingSegment {
index: usize,
total: usize,
},
PeerSegmentLimit {
segments: usize,
max: u32,
},
PeerCannotReceive {
capability: Segmentation,
},
PayloadCapacityExceeded,
PayloadAccountingOverflow,
NegativeAckRetriesExhausted,
EndpointAckTooLong,
EndpointRequestTooLong,
}Expand description
Why a payload could not be split into segments, or its segments put back together, or a segmented request sent (#1802).
It displays as segmentation error: and the variant’s text, built when
displayed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ZeroSegmentSize
A segment size of 0: a segment still costs its PDU header, so a peer whose maximum APDU can’t hold that header can’t take one.
TooManySegments
The payload needs more than the 256 segments a sequence number can count.
SegmentTooLarge
A received segment larger than the receiver takes.
Fields
TotalTooLarge
A reassembly asked for more than 256 segments.
MissingSegment
A segment due in the reassembly was never received.
Fields
PeerSegmentLimit
A request needs more segments than the peer said it accepts.
PeerCannotReceive
A request needs segmenting and the peer advertised that it can’t receive segmented requests.
Fields
capability: SegmentationThe segmentation support the peer advertised.
PayloadCapacityExceeded
A segmented request’s octets, or its count of segments, passed the receiver’s cap.
PayloadAccountingOverflow
Counting a segmented request’s octets overflowed.
NegativeAckRetriesExhausted
The peer kept asking for the same window again with negative SegmentACKs past the sender’s retry limit.
EndpointAckTooLong
An endpoint operation’s acknowledgement is longer than the endpoint’s maximum APDU; endpoint operations don’t reassemble segments.
EndpointRequestTooLong
An endpoint request too long for one APDU; the endpoint requester doesn’t segment.
Trait Implementations§
Source§impl Clone for SegmentationError
impl Clone for SegmentationError
impl Copy for SegmentationError
Source§impl Debug for SegmentationError
impl Debug for SegmentationError
Source§impl Display for SegmentationError
impl Display for SegmentationError
impl Eq for SegmentationError
Source§impl Error for SegmentationError
impl Error for SegmentationError
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()