pub(crate) struct Outcome {
pub(crate) plan: Plan,
pub(crate) result: Result<Effect, Refusal>,
pub(crate) note_elided: bool,
pub(crate) clamped: Option<Deferral>,
pub(crate) entered_backpressure: bool,
}Expand description
Everything one execute call decided.
Fields§
§plan: PlanWhat the caller must do with the wire.
result: Result<Effect, Refusal>The effect that was reported, or the refusal that was. Both have already been emitted — this is returned for the caller’s own bookkeeping and for tests, not as an instruction to report again.
note_elided: boolThe caller must call framer.note_elided(meta) before polling the
framer again.
True for an admitted DropMode::Elide at Site::Object,
including a deferred one: the framer’s cursor is positional and
note_elided asserts it names the object most recently emitted, so
it cannot be moved to the release.
clamped: Option<Deferral>The Action::Delay arithmetic, on a Delay and only on a Delay.
Deferral::was_clamped() says whether
crate::action::EgressConfig::max_hold cut the request short; when
it did, ImpairmentKind::HoldClamped has already been emitted.
Returned so a test can assert the arithmetic without reading the
observer. None for every other action, including Action::Hold,
which carries no requested duration to clamp.
Read only by the tests below — the impairment it describes has already
been emitted, so session.rs has nothing left to do with it. It stays
on the returned value rather than being dropped because the clamp is
assertable without an observer is what makes the arithmetic gateable at
all.
entered_backpressure: boolSet on the push after which the queue stops accepting reads.
Already reported as ImpairmentKind::EgressQueueFull, once per
stream. Read only by the tests below, for the same reason
Self::clamped is.