Struct Code
pub struct Code(/* private fields */);http and std only.Expand description
An HTTP/3 or QPACK error code, as carried by RESET_STREAM, STOP_SENDING, GOAWAY and the
QUIC CONNECTION_CLOSE application-error space (RFC 9114 §8.1, RFC 9204 §6).
Unknown and reserved values are preserved rather than rejected: an endpoint treats an
unrecognized code the same as Code::H3_NO_ERROR (RFC 9114 §8.1), and reserved
(0x1f * N + 0x21) codes exist only so that endpoints do not ossify around a fixed set.
Implementations§
§impl Code
impl Code
pub const fn is_reserved(self) -> bool
pub const fn is_reserved(self) -> bool
Whether this is a reserved code of the form 0x1f * N + 0x21 (RFC 9114 §8.1).
These are used to exercise requirements that unknown codes be handled gracefully; they have no other semantics.
§impl Code
impl Code
pub const H3_NO_ERROR: Code
pub const H3_NO_ERROR: Code
No error (RFC 9114 §8.1). Also used for any unrecognized error code.
pub const H3_GENERAL_PROTOCOL_ERROR: Code
pub const H3_GENERAL_PROTOCOL_ERROR: Code
Peer violated protocol requirements without a more specific code.
pub const H3_INTERNAL_ERROR: Code
pub const H3_INTERNAL_ERROR: Code
Internal error.
pub const H3_STREAM_CREATION_ERROR: Code
pub const H3_STREAM_CREATION_ERROR: Code
A stream was created that could not be created.
pub const H3_CLOSED_CRITICAL_STREAM: Code
pub const H3_CLOSED_CRITICAL_STREAM: Code
A required critical stream was closed.
pub const H3_FRAME_UNEXPECTED: Code
pub const H3_FRAME_UNEXPECTED: Code
A frame was received on a stream where it is not permitted.
pub const H3_FRAME_ERROR: Code
pub const H3_FRAME_ERROR: Code
A frame that fails to satisfy layout requirements.
pub const H3_EXCESSIVE_LOAD: Code
pub const H3_EXCESSIVE_LOAD: Code
An endpoint detected that its peer is creating excessive load.
pub const H3_ID_ERROR: Code
pub const H3_ID_ERROR: Code
A stream or push ID was used incorrectly.
pub const H3_SETTINGS_ERROR: Code
pub const H3_SETTINGS_ERROR: Code
An endpoint detected an error in the SETTINGS frame.
pub const H3_MISSING_SETTINGS: Code
pub const H3_MISSING_SETTINGS: Code
No SETTINGS frame was received at the beginning of the control stream.
pub const H3_REQUEST_REJECTED: Code
pub const H3_REQUEST_REJECTED: Code
A request was rejected without processing.
pub const H3_REQUEST_CANCELLED: Code
pub const H3_REQUEST_CANCELLED: Code
The request or its response is cancelled.
pub const H3_REQUEST_INCOMPLETE: Code
pub const H3_REQUEST_INCOMPLETE: Code
The client’s stream terminated without a complete request.
pub const H3_MESSAGE_ERROR: Code
pub const H3_MESSAGE_ERROR: Code
An HTTP message was malformed and cannot be processed.
pub const H3_CONNECT_ERROR: Code
pub const H3_CONNECT_ERROR: Code
The TCP connection established for a CONNECT request was reset or abnormally closed.
pub const H3_VERSION_FALLBACK: Code
pub const H3_VERSION_FALLBACK: Code
The requested operation cannot be served over HTTP/3; peer should retry over HTTP/1.1.
pub const QPACK_DECOMPRESSION_FAILED: Code
pub const QPACK_DECOMPRESSION_FAILED: Code
The decoder failed to interpret an encoded field section (RFC 9204 §6).
pub const QPACK_ENCODER_STREAM_ERROR: Code
pub const QPACK_ENCODER_STREAM_ERROR: Code
Error on the encoder stream (RFC 9204 §6).
pub const QPACK_DECODER_STREAM_ERROR: Code
pub const QPACK_DECODER_STREAM_ERROR: Code
Error on the decoder stream (RFC 9204 §6).
Trait Implementations§
impl Copy for Code
impl Eq for Code
§impl Ord for Code
impl Ord for Code
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialOrd for Code
impl PartialOrd for Code
impl StructuralPartialEq for Code
Auto Trait Implementations§
impl Freeze for Code
impl RefUnwindSafe for Code
impl Send for Code
impl Sync for Code
impl Unpin for Code
impl UnsafeUnpin for Code
impl UnwindSafe for Code
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn rama_try_from(value: T) -> Result<U, <U as RamaTryFrom<T>>::Error>
§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.