Skip to main content

Http3HeaderSectionError

Enum Http3HeaderSectionError 

Source
pub enum Http3HeaderSectionError {
Show 22 variants FieldSectionSizeOverflow { field_index: usize, }, InvalidFieldName { field_index: usize, }, UppercaseFieldName { field_index: usize, }, InvalidFieldValue { field_index: usize, }, PseudoFieldAfterRegular { field_index: usize, }, PseudoFieldInTrailers { field_index: usize, }, InvalidPseudoField { field_index: usize, }, DuplicatePseudoField { field_index: usize, }, MissingPseudoField { name: &'static [u8], }, ConnectionSpecificField { field_index: usize, }, InvalidTe { field_index: usize, }, DuplicateHost { field_index: usize, }, MissingAuthorityOrHost, InvalidAuthority { field_index: usize, }, InvalidHost { field_index: usize, }, AuthorityHostMismatch { authority_field_index: usize, host_field_index: usize, }, InvalidMethod { field_index: usize, }, InvalidScheme { field_index: usize, }, InvalidPath { field_index: usize, }, InvalidProtocol { field_index: usize, }, InvalidConnectPseudoFields { field_index: usize, }, InvalidStatus { field_index: usize, },
}
Expand description

Failure to semantically validate a decoded HTTP/3 field section.

field_index values identify decoded fields in wire order. They are not byte offsets because QPACK decoding does not retain a field’s encoded wire offset.

Variants§

§

FieldSectionSizeOverflow

Adding a decoded field’s RFC 9114 size contribution overflowed u64.

Fields

§field_index: usize

Index of the field whose contribution overflowed.

§

InvalidFieldName

A regular field name is empty or not an HTTP token.

Fields

§field_index: usize

Index of the invalid field.

§

UppercaseFieldName

A regular field name contains an uppercase ASCII byte.

Fields

§field_index: usize

Index of the invalid field.

§

InvalidFieldValue

A field value contains invalid HTTP field-content or leading/trailing whitespace.

Fields

§field_index: usize

Index of the invalid field.

§

PseudoFieldAfterRegular

A pseudo-field follows a regular field.

Fields

§field_index: usize

Index of the misplaced pseudo-field.

§

PseudoFieldInTrailers

A trailer section contains a pseudo-field.

Fields

§field_index: usize

Index of the forbidden pseudo-field.

§

InvalidPseudoField

A pseudo-field is unknown or forbidden for this section context.

Fields

§field_index: usize

Index of the invalid pseudo-field.

§

DuplicatePseudoField

A pseudo-field repeats an earlier pseudo-field.

Fields

§field_index: usize

Index of the repeated pseudo-field.

§

MissingPseudoField

A required pseudo-field is absent.

Fields

§name: &'static [u8]

Name of the missing pseudo-field.

§

ConnectionSpecificField

A connection-specific field is forbidden in HTTP/3.

Fields

§field_index: usize

Index of the forbidden field.

§

InvalidTe

A te field is forbidden here or does not contain only trailers values.

Fields

§field_index: usize

Index of the invalid field.

§

DuplicateHost

A host field repeats an earlier Host field.

Fields

§field_index: usize

Index of the repeated Host field.

§

MissingAuthorityOrHost

A request has neither a nonempty :authority nor a nonempty Host field.

§

InvalidAuthority

A :authority value is invalid for the request form.

Fields

§field_index: usize

Index of the invalid :authority field.

§

InvalidHost

A Host field is empty.

Fields

§field_index: usize

Index of the invalid Host field.

§

AuthorityHostMismatch

:authority and Host are both present but differ.

Fields

§authority_field_index: usize

Index of the :authority field.

§host_field_index: usize

Index of the Host field.

§

InvalidMethod

The :method pseudo-field is empty or not an HTTP token.

Fields

§field_index: usize

Index of the invalid :method field.

§

InvalidScheme

The :scheme pseudo-field is empty or malformed.

Fields

§field_index: usize

Index of the invalid :scheme field.

§

InvalidPath

The :path pseudo-field is empty or invalid for an HTTP scheme.

Fields

§field_index: usize

Index of the invalid :path field.

§

InvalidProtocol

The :protocol pseudo-field is disabled, malformed, or not paired with CONNECT.

Fields

§field_index: usize

Index of the invalid :protocol field.

§

InvalidConnectPseudoFields

An ordinary CONNECT request contains :scheme or :path.

Fields

§field_index: usize

Index of the first forbidden pseudo-field.

§

InvalidStatus

The :status pseudo-field is malformed, forbidden, or outside the accepted range.

Fields

§field_index: usize

Index of the invalid :status field.

Implementations§

Source§

impl Http3HeaderSectionError

Source

pub const fn error_code(self) -> Http3ErrorCode

Returns the HTTP/3 application error code required by every semantic field-section error.

Trait Implementations§

Source§

impl Clone for Http3HeaderSectionError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Http3HeaderSectionError

Source§

impl Debug for Http3HeaderSectionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Http3HeaderSectionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Http3HeaderSectionError

Source§

impl Error for Http3HeaderSectionError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for Http3HeaderSectionError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Http3HeaderSectionError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.