Skip to main content

Http2Error

Enum Http2Error 

Source
pub enum Http2Error {
Show 62 variants ExceedAmountOfOpenedStreams, ExceedAmountOfActiveConcurrentStreams, HeadersOverflow, HpackDecodingBufferIsTooSmall, IncompleteHeader, InsufficientHpackBytes, InvalidClientHeader, InvalidContentLength, InvalidContinuationFrame, InvalidDataFrameDataLen, InvalidDataFrameZeroId, InvalidDynTableSizeUpdate, InvalidErrorCode, InvalidFramePad, InvalidGoAwayFrameBytes, InvalidGoAwayFrameNonZeroId, InvalidHpackIdx(u32), InvalidHeaderFrame, InvalidHeadersFrameZeroId, InvalidPingFrameBytes, InvalidPingFrameNonZeroId, InvalidReceivedFrameAfterEos, InvalidResetStreamFrameBytes, InvalidResetStreamFrameZeroId, InvalidSendStreamState, InvalidServerHeader, InvalidServerHeaderUriOverflow, InvalidSettingsFrameLength, InvalidSettingsFrameNonZeroId, InvalidSettingsFrameNonEmptyAck, InvalidWindowUpdateFrameBytes, InvalidWindowUpdateSize, InvalidWindowUpdateZeroIncrement, LargeArbitraryFrameLen { received: u32, }, LargeBodyLen(Option<u32>), LargeIgnorableFrameLen, MissingEOSInTrailer, NoPreface, OutOfBoundsIndex, OutOfBoundsMaxFrameSize, OutOfBoundsWindowSize, PushPromiseIsUnsupported, UnexpectedContinuationFrame, UnexpectedEndingHuffman, UnexpectedHeaderFrame, UnexpectedHpackIdx, UnexpectedNonControlFrame, UnexpectedPreFixedHeaderName, UnexpectedStreamId, UnknownDataStreamReceiver, UnknownInitialServerHeaderId(u32), UnknownResetStreamReceiver, UnknownSettingFrameTy, UnknownStreamId, UnknownStreamReceiver, UnknownWindowUpdateStreamReceiver, UnsupportedHeaderNameOrValueLen, VeryLargeAmountOfContinuationFrames, VeryLargeAmountOfFrameMismatches, VeryLargeHeaderInteger, VeryLargeHeadersLen, WebSocketContinuationFrame,
}
Available on crate feature http2 only.
Expand description

Errors for Http2.

Variants§

§

ExceedAmountOfOpenedStreams

The number of opened streams extrapolated the threshold

§

ExceedAmountOfActiveConcurrentStreams

The number of active concurrent streams extrapolated the threshold

§

HeadersOverflow

The system only supports 2 header frames when sending data

§

HpackDecodingBufferIsTooSmall

Couldn’t decode a header into a hpack buffer

§

IncompleteHeader

A header was not fully constructed.

§

InsufficientHpackBytes

There are no bytes left to decode HPACK headers.

§

InvalidClientHeader

Received data that should be exclusive for servers

§

InvalidContentLength

Content length has a value that is different than the actual payload length

§

InvalidContinuationFrame

Continuation frame found in invalid order

§

InvalidDataFrameDataLen

Length is greater than u32::MAX.

§

InvalidDataFrameZeroId

Stream ID must not be zero

§

InvalidDynTableSizeUpdate

Size updates of dynamic table can’t be placed after the first header

§

InvalidErrorCode

Provided number does not match any HTTP/2 error code

§

InvalidFramePad

Frame pad was invalid bytes

§

InvalidGoAwayFrameBytes

Received bytes don’t have an expected format or stream ID is zero.

§

InvalidGoAwayFrameNonZeroId

Stream ID must be zero

§

InvalidHpackIdx(u32)

A container does not contain an element referred by the given idx

§

InvalidHeaderFrame

Header frame has mal-formatted content

§

InvalidHeadersFrameZeroId

Stream ID must not be zero

§

InvalidPingFrameBytes

Received bytes don’t have an expected format or stream ID is zero.

§

InvalidPingFrameNonZeroId

Stream ID must be zero

§

InvalidReceivedFrameAfterEos

Invalid frame after received EOS

§

InvalidResetStreamFrameBytes

Received bytes don’t have an expected format or stream ID is zero.

§

InvalidResetStreamFrameZeroId

Stream ID must not be zero

§

InvalidSendStreamState

Stream is in a state that forbids sending more data

§

InvalidServerHeader

Received insufficient data to fullfil a server’s header

§

InvalidServerHeaderUriOverflow

URI is too large for servers

§

InvalidSettingsFrameLength

Settings frames length must be divisible by 6

§

InvalidSettingsFrameNonZeroId

Stream ID must be zero

§

InvalidSettingsFrameNonEmptyAck

Settings ACK must be empty

§

InvalidWindowUpdateFrameBytes

Received bytes don’t have an expected format or stream ID is zero.

§

InvalidWindowUpdateSize

Size increment can’t be greater than2^31 - 1.

§

InvalidWindowUpdateZeroIncrement

Size increment must be greater than zero

§

LargeArbitraryFrameLen

Received arbitrary frame extrapolates delimited maximum length

Fields

§received: u32

Received length from a response

§

LargeBodyLen(Option<u32>)

Set of received data frames extrapolate delimited maximum length

§

LargeIgnorableFrameLen

Ignorable frames extrapolates delimited maximum length

§

MissingEOSInTrailer

All trailer frames must include the EOS flag

§

NoPreface

Counter-part did not return the correct bytes of a HTTP2 connection preface

§

OutOfBoundsIndex

Received index is greater than the supported range

§

OutOfBoundsMaxFrameSize

Frame size must be within 16384 and 16777215

§

OutOfBoundsWindowSize

Window size must be within 0 and 2147483647

§

PushPromiseIsUnsupported

Browsers don’t support PUSH_PROMISE

§

UnexpectedContinuationFrame

Received frame should be a continuation frame with correct ID

§

UnexpectedEndingHuffman

Decoding logic encountered an unexpected ending string signal.

§

UnexpectedHeaderFrame

Header frames must be received only once per block

§

UnexpectedHpackIdx

Received an Hpack index that does not adhere to the standard

§

UnexpectedNonControlFrame

The stream is in a state where it can only receive control frames

§

UnexpectedPreFixedHeaderName

Unknown header name.

§

UnexpectedStreamId

Servers must only receive odd IDs or IDs are lower than the current highest value

§

UnknownDataStreamReceiver

A stream ID is not locally stored to allow the processing of data frames.

§

UnknownInitialServerHeaderId(u32)

A programming error that shouldn’t never happen

§

UnknownResetStreamReceiver

A stream ID is not locally stored to allow the processing of reset frames.

§

UnknownSettingFrameTy

Type is out of range or unsupported.

§

UnknownStreamId

Stream id doesn’t exist locally

§

UnknownStreamReceiver

A stream ID is not locally stored.

§

UnknownWindowUpdateStreamReceiver

A stream ID is not locally stored to allow the processing of window update frames.

§

UnsupportedHeaderNameOrValueLen

Length of a header name or value is limited to 127 bytes.

§

VeryLargeAmountOfContinuationFrames

The system does not support more than16 continuation frames.

§

VeryLargeAmountOfFrameMismatches

The system does not support more than32 fetches of frames with mismatches IDs or mismatches types

§

VeryLargeHeaderInteger

Header integers must be equal or lesser than u16::MAX

§

VeryLargeHeadersLen

Received headers is too large to sent

§

WebSocketContinuationFrame

Continuation frames are not supported in HTTP/2

Trait Implementations§

Source§

impl Debug for Http2Error

Source§

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

Formats the value using the given formatter. Read more

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more