Skip to main content

BypassReason

Enum BypassReason 

Source
#[non_exhaustive]
pub enum BypassReason { UnsupportedSubgroupStreamType, NoFetchObjectCodec, FetchGroupOrderUnknown, ObjectBeyondMeasuringReach, DecodeError, }
Expand description

Why ObjectFramer stopped parsing a stream.

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

UnsupportedSubgroupStreamType

The header decoded but the object reader rejected this subgroup stream type.

§

NoFetchObjectCodec

This build compiled no object reader for the fetch stream’s draft, so the stream is forwarded intact from its header on.

Defensive rather than routine. The stream header decodes first and fails first on a draft that was not compiled, reporting Self::DecodeError, so a session reaches this only if the header dispatch and the object-reader dispatch ever disagree about which drafts this binary speaks.

It used to mean something else and much more common: a fetch stream on any of drafts 15-19, none of which this crate would address. Three of those five are now framed, and the two that are not report Self::FetchGroupOrderUnknown, which says why.

§

FetchGroupOrderUnknown

A fetch stream on draft-18 or draft-19 naming a request this session never saw asked for.

Those two drafts write an Object’s Group ID as a difference from the previous Object’s, and the fetch’s Group Order decides which way the difference points — draft-19 Section 11.4.4.1: “If the Group Order is Ascending, the Group ID is the prior Object’s Group ID plus the Group ID Delta + 1. If the Group Order is Descending, the Group ID is the prior Object’s Group ID minus the (Group ID Delta + 1).”

Nothing on the data stream states the order. It is on the FETCH the stream answers — draft-19 Section 10.2.8: “If omitted from FETCH, the receiver uses Ascending (0x1)” — so a session that carried the FETCH knows it, files it under that Request ID, and hands it to the framer when the response stream opens. See FetchGroupOrders.

What is left for this variant is the stream whose FETCH never came past: a publisher answering a request nobody made, a session whose control plane is a byte pump because nothing frames its data either, or a hook that rewrote a FETCH into bytes that no longer decode.

Guessing would not fail loudly, which is why an unanswered stream is bypassed rather than read against the draft’s default. A descending stream read as ascending decodes every Object and every field of it; only the Group IDs are wrong, walking up where the publisher sent them walking down. Every event reported off this stream and every shaping rule keyed on a group would then be wrong with nothing to say so. The bytes are forwarded untouched instead.

§

ObjectBeyondMeasuringReach

An object could not be measured within the buffer cap’s reach.

§

DecodeError

A header or object failed to decode. Also reported as FramerOut::Error.

Trait Implementations§

Source§

impl Clone for BypassReason

Source§

fn clone(&self) -> BypassReason

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 BypassReason

Source§

impl Debug for BypassReason

Source§

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

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

impl Eq for BypassReason

Source§

impl PartialEq for BypassReason

Source§

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

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