#[non_exhaustive]pub enum Overflow {
Block,
DropTail,
ResetStream {
code: u64,
},
}Expand description
What happens when a per-stream queue is full.
#[non_exhaustive], with Block as the Default: the only
non-destructive answer is the one a caller gets without asking.
There is deliberately no DropHead. Dropping an already queued unit
happens after the framer’s positional cursor has moved past it, so the
elide fix-up can no longer be armed — and on drafts 14-19 object IDs are
delta-encoded, so the result is not a gap but every successor decoding
with a wrong absolute ID. Overflow::DropTail is sound for exactly
the reason DropHead is not: it discards the arriving unit, at
admission time, where the fix-up is still legal.
Written as "block", "drop-tail" or {"reset-stream": {"code": 1}}.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Block
Stop reading the source. Non-destructive. Default.
Per stream, and it does not reliably stall the peer: the transport’s own receive window absorbs megabytes first.
DropTail
Discard the arriving unit. Renumbers via the framer’s own elide fix-up, so absolute object IDs stay correct on drafts 14-19.
When an elide guard refuses the fix-up the unit is admitted anyway — the queue overshoots by one — and the refusal is reported. A shaper may not corrupt a stream to honour a depth limit.
ResetStream
Abandon the destination stream.