Skip to main content

Http2ParseError

Enum Http2ParseError 

Source
pub enum Http2ParseError {
Show 14 variants Incomplete { required: usize, available: usize, }, ClientPrefaceMismatch { offset: usize, expected: u8, actual: u8, }, PayloadTooLarge { maximum: usize, actual: usize, }, WrongFrameType { expected: Http2FrameType, actual: Http2FrameType, }, ZeroStreamId, ExpectedZeroStreamId, FrameSizeMismatch { expected: usize, actual: usize, }, ZeroWindowIncrement, SettingsPayloadLength { actual: usize, }, SettingsAckPayload { actual: usize, }, InvalidSettingValue { id: Http2SettingId, value: u32, }, ZeroPromisedStreamId, InvalidPadding { padding_length: u8, payload_length: usize, }, MalformedPayload { required: usize, available: usize, },
}
Expand description

Failure to validate a raw HTTP/2 wire layout.

Variants§

§

Incomplete

Fewer bytes than a fixed prefix or declared frame payload were supplied.

Fields

§required: usize

Required bytes.

§available: usize

Available bytes.

§

ClientPrefaceMismatch

A byte differs from the required client-preface byte.

Fields

§offset: usize

Offset of the mismatched byte.

§expected: u8

Required byte.

§actual: u8

Supplied byte.

§

PayloadTooLarge

A declared frame payload exceeds the caller-provided maximum.

Fields

§maximum: usize

Caller-provided maximum payload length.

§actual: usize

Declared payload length.

§

WrongFrameType

A typed frame view was requested for a different raw frame type.

Fields

§expected: Http2FrameType

Required frame type.

§actual: Http2FrameType

Actual frame type.

§

ZeroStreamId

A frame that requires a stream has a zero 31-bit stream identifier.

§

ExpectedZeroStreamId

A frame that requires the connection stream has a nonzero 31-bit stream identifier.

§

FrameSizeMismatch

A fixed-layout frame has an unexpected payload length.

Fields

§expected: usize

Required payload length.

§actual: usize

Actual payload length.

§

ZeroWindowIncrement

A WINDOW_UPDATE frame has a zero 31-bit increment.

§

SettingsPayloadLength

A SETTINGS payload does not contain a whole number of six-byte parameters.

Fields

§actual: usize

Actual payload length.

§

SettingsAckPayload

A SETTINGS frame with ACK set has a nonempty payload.

Fields

§actual: usize

Actual payload length.

§

InvalidSettingValue

A SETTINGS parameter has an intrinsically invalid value.

Fields

§id: Http2SettingId

Encoded setting identifier.

§value: u32

Encoded setting value.

§

ZeroPromisedStreamId

A PUSH_PROMISE frame has a zero 31-bit promised stream identifier.

§

InvalidPadding

A PADDED frame has no pad-length byte or declares too much padding.

Fields

§padding_length: u8

Encoded padding length, or zero when the pad-length byte is absent.

§payload_length: usize

Total payload length.

§

MalformedPayload

A required intrinsic payload section is truncated.

Fields

§required: usize

Required bytes in the section.

§available: usize

Available bytes in the section.

Trait Implementations§

Source§

impl Clone for Http2ParseError

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 Http2ParseError

Source§

impl Debug for Http2ParseError

Source§

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

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

impl Display for Http2ParseError

Source§

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

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

impl Eq for Http2ParseError

Source§

impl PartialEq for Http2ParseError

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 Http2ParseError

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.