pub enum Http3MessageContentError {
Show 13 variants
InvalidContentLength {
field_index: usize,
member_index: usize,
},
ContentLengthOverflow {
field_index: usize,
member_index: usize,
},
ConflictingContentLength {
field_index: usize,
member_index: usize,
expected: u64,
actual: u64,
},
ContentLengthInTrailers {
field_index: usize,
},
ProhibitedContentLength {
field_index: usize,
},
UnexpectedHeaderSection {
expected: Http3ContentOperation,
actual: Http3HeadersKind,
},
OperationNotReady {
operation: Http3ContentOperation,
},
ContentNotAllowed {
data_length: usize,
},
DataLengthNotRepresentable {
length: usize,
},
ReceivedLengthOverflow {
received_length: u64,
frame_length: u64,
},
ContentLengthMismatch {
declared: u64,
received: u64,
},
NotHttpMessageContent,
IncompleteMessage,
}Expand description
Failure while accounting for HTTP message content and Content-Length.
Local operation sequencing and tunnel handoff failures have no HTTP/3 peer error code. The remaining variants describe peer message-content violations.
Variants§
InvalidContentLength
A Content-Length list member is empty or not an ASCII decimal number.
Fields
ContentLengthOverflow
A Content-Length list member overflows u64.
Fields
ConflictingContentLength
A Content-Length list member differs from the earlier normalized value.
Fields
ContentLengthInTrailers
A trailer field section contains Content-Length.
ProhibitedContentLength
Content-Length is forbidden for this message form.
UnexpectedHeaderSection
A validated header section was supplied at the wrong content-accounting operation.
Fields
expected: Http3ContentOperationOperation expected by content accounting.
actual: Http3HeadersKindValidated role carried by the supplied section.
OperationNotReady
A local content-accounting operation cannot proceed in the current message phase.
Fields
operation: Http3ContentOperationOperation that cannot proceed.
ContentNotAllowed
DATA is forbidden because this message form has no HTTP content.
DataLengthNotRepresentable
A DATA payload length cannot be represented as u64.
ReceivedLengthOverflow
Adding a DATA payload length overflows cumulative received length.
Fields
ContentLengthMismatch
Received HTTP content does not equal the declared Content-Length.
NotHttpMessageContent
A caller supplied an HTTP-content operation after CONNECT tunnel handoff.
IncompleteMessage
The message ended before required initial or final headers were accepted.
Implementations§
Source§impl Http3MessageContentError
impl Http3MessageContentError
Sourcepub const fn error_code(self) -> Option<Http3ErrorCode>
pub const fn error_code(self) -> Option<Http3ErrorCode>
Returns the HTTP/3 peer error code when this failure is peer-caused.
Trait Implementations§
Source§impl Clone for Http3MessageContentError
impl Clone for Http3MessageContentError
impl Copy for Http3MessageContentError
Source§impl Debug for Http3MessageContentError
impl Debug for Http3MessageContentError
Source§impl Display for Http3MessageContentError
impl Display for Http3MessageContentError
impl Eq for Http3MessageContentError
Source§impl Error for Http3MessageContentError
impl Error for Http3MessageContentError
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()