Skip to main content

Refusal

Enum Refusal 

Source
#[non_exhaustive]
pub enum Refusal { WrongSite { site: Site, action: ActionKind, }, WrongComposition { detail: &'static str, }, ControlStreamResetIllegal, LengthChanged { from: u64, to: u64, }, WouldRedefineSubgroupId, WouldDestroyStatusObject, ReservedHeaderMode { mode: u8, }, PayloadNotDelimited { detail: &'static str, }, StreamNotFramed { reason: BypassReason, }, ControlFrameNotDecodable, ErrorCodeOutOfRange { code: u64, }, SessionAlreadyClosing, }
Expand description

Why an action could not be executed.

Reported per attempt, never once per stream. A rule that would have fired forty times and was refused forty times reports forty.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

WrongSite

The action has no meaning at this site.

Fields

§site: Site

Where it was attempted.

§action: ActionKind

What was attempted.

§

WrongComposition

A Delay or Hold wrapped an action the engine cannot schedule.

Fields

§detail: &'static str

What the modifier wrapped.

§

ControlStreamResetIllegal

Performing it would be a session-level protocol violation — a reset or truncation of a control stream, on any draft 07-19.

§

LengthChanged

ReplacePayload whose length differs from the original.

Fields

§from: u64

The original payload length.

§to: u64

The replacement’s length.

§

WouldRedefineSubgroupId

Eliding index 0 of a stream whose subgroup ID is the first object’s ID would silently redefine the subgroup ID downstream.

§

WouldDestroyStatusObject

Eliding an object that carries an Object Status would destroy what may be a boundary marker.

§

ReservedHeaderMode

The stream header’s subgroup-ID mode field holds a value this draft reserves, so the header is not interpretable and no object on the stream can be safely renumbered. Distinct from Self::WouldRedefineSubgroupId on purpose. On drafts 15 through 19 the codec stores a placeholder zero for both mode 1 (subgroup ID is the first object’s ID) and mode 3 (reserved), so an accessor returning Option<u64> cannot tell them apart and the earlier guard would have reported WouldRedefineSubgroupId for a reserved-mode header, where that reason is simply untrue. AnySubgroupHeader::subgroup_id_mode() is what makes the distinction available.

Fields

§mode: u8

The mode value read from the header-type octet.

§

PayloadNotDelimited

The unit’s payload boundary is not derivable, so a payload-preserving splice cannot be located.

Datagrams only. See Precondition::DatagramPayloadDelimited for the three cases.

Fields

§detail: &'static str

Which case: *draft-14 header decode consumes the payload*, *status datagram has no payload*, or *datagram header did not decode*.

§

StreamNotFramed

The framer stopped parsing this stream, so there is nothing addressable to act on.

Table-only — see the module’s note above Precondition. The engine never emits it, because when it is true the hook is never called.

Fields

§reason: BypassReason

Why the framer gave up.

§

ControlFrameNotDecodable

The decoder refused this control frame, so there is nothing decoded to act on.

Table-only — see the module’s note above Precondition. The engine never emits it, because when it is true ProxyHook::on_control_message is never called: the message it would be handed is the thing that did not decode.

Published for a draft this build did not compile, where AnyControlMessage::decode has no arm and refuses every frame the stream carries. One malformed frame on a draft that is compiled is refused for the same reason, but that is a fact about one frame rather than about the pair the table answers for, so no cell publishes it and the run reports it as ImpairmentKind::ControlFrameNotDecodable instead.

§

ErrorCodeOutOfRange

The application error code exceeds the QUIC varint range (2^62 - 1). Nothing was sent and the stream stays usable.

Fields

§code: u64

The code that was requested.

§

SessionAlreadyClosing

A session close is already in flight.

Trait Implementations§

Source§

impl Clone for Refusal

Source§

fn clone(&self) -> Refusal

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 Debug for Refusal

Source§

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

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

impl Eq for Refusal

Source§

impl PartialEq for Refusal

Source§

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

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> 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> 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, 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, <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