#[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
WrongSite
The action has no meaning at this site.
WrongComposition
A Delay or Hold wrapped an action the engine cannot schedule.
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.
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.
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
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: BypassReasonWhy 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.
SessionAlreadyClosing
A session close is already in flight.