fn check_composition(inner: &Action) -> Result<(), Refused>Expand description
Composition: a modifier accepts only a content action.
Checked before the unit is queued, so a bad composition never reaches
the deque and egress_items_queued does not move — which is what
a_delay_wrapping_a_terminal_is_refused_before_it_is_queued asserts.
The four legal inner actions are Action::Pass,
Action::Replace, Action::ReplacePayload and Action::Drop.
Action::Drop belongs on it, and the fact that it does is worth one
sentence here because the Action rustdoc once said the opposite: a
deferred drop is not a no-op, because it holds an ordering slot for
the whole of its delay and PendingQueue::pop_next_due only ever
considers the front. The unit is deleted and the rest of the stream
is head-of-line-blocked, which is the impairment the composition exists
to express.
a_delayed_drop_is_admitted_and_blocks_the_stream_behind_it is the
falsifiable form of that claim — it asserts the successor’s clamp, not
merely the admission, so a revision that queued the drop without an
ordering slot would still fail it.