Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[repr(u8)]
pub enum ErrorCode {
Show 15 variants Cancel = 8, Compression = 9, Connect = 10, EnhanceYourCalm = 11, FlowControl = 3, FrameSize = 6, Http11Required = 13, InadequateSecurity = 12, NoError = 0, Internal = 2, Protocol = 1, RefusedStream = 7, SettingsTimeout = 4, StreamClosed = 5, Unsupported = 255,
}
Expand description

Error codes.

Variants§

§

Cancel = 8

Cancel error.

§

Compression = 9

Compression error.

§

Connect = 10

Connect error.

§

EnhanceYourCalm = 11

Enhance your calm error.

§

FlowControl = 3

Flow control error.

§

FrameSize = 6

Frame size error.

§

Http11Required = 13

HTTP/1.1 required error.

§

InadequateSecurity = 12

Inadequate security error.

§

NoError = 0

No error.

§

Internal = 2

Internal error.

§

Protocol = 1

Protocol error.

§

RefusedStream = 7

Refused stream error.

§

SettingsTimeout = 4

Settings timeout error.

§

StreamClosed = 5

Stream closed error.

§

Unsupported = 255

Unsupported error.

Implementations§

Source§

impl ErrorCode

Source

pub fn from_u8(byte: u8) -> ErrorCode

Create a new ErrorCode from a u8.

Source

pub fn as_byte(&self) -> u8

Convert this error code to byte value.

Source

pub fn is_cancel(&self) -> bool

Indicates that this an ErrorCode::Cancel.

Source

pub fn is_compression(&self) -> bool

Indicates that this an ErrorCode::Compression.

Source

pub fn is_connect(&self) -> bool

Indicates that this an ErrorCode::Connect.

Source

pub fn is_enhance_your_calm(&self) -> bool

Indicates that this an ErrorCode::EnhanceYourCalm.

Source

pub fn is_flow_control(&self) -> bool

Indicates that this an ErrorCode::FlowControl.

Source

pub fn is_frame_size(&self) -> bool

Indicates that this an ErrorCode::FrameSize.

Source

pub fn is_http_1_1_required(&self) -> bool

Indicates that this an ErrorCode::Http11Required.

Source

pub fn is_inadequate_security(&self) -> bool

Indicates that this an ErrorCode::InadequateSecurity.

Source

pub fn is_internal(&self) -> bool

Indicates that this an ErrorCode::Internal.

Source

pub fn is_no_error(&self) -> bool

Indicates that this an ErrorCode::NoError.

Source

pub fn is_protocol(&self) -> bool

Indicates that this an ErrorCode::Protocol.

Source

pub fn is_refused_stream(&self) -> bool

Indicates that this an ErrorCode::RefusedStream.

Source

pub fn is_settings_timeout(&self) -> bool

Indicates that this an ErrorCode::SettingsTimeout.

Source

pub fn is_stream_closed(&self) -> bool

Indicates that this an ErrorCode::StreamClosed.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> ErrorCode

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 ErrorCode

Source§

impl Debug for ErrorCode

Source§

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

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

impl Display for ErrorCode

Source§

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

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

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &ErrorCode) -> 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 ErrorCode

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.