Skip to main content

Module phases

Module phases 

Source
Expand description

Phase-specific time ceilings inside the one attempt budget (spec 020, 3.4, I-1).

An enabled PhasePolicy gives each transport phase a positive ceiling. A ceiling is a maximum within the attempt’s remaining budget, never a budget of its own: when a phase starts, its effective allowance is the lesser of its ceiling and the budget left at that moment. A phase that uses less leaves the rest to the budget; no later phase recovers time an earlier one used, and a phase that is skipped (a plaintext exchange has no secure handshake) transfers nothing.

PhaseClock is shared by the exchange, which enters each phase as it starts, and phased, which watches the current phase’s deadline. The response-body phase starts at the first response byte and ends with the complete bounded body: chunks never restart it. Phases only move forward. Disabled is the default and changes nothing.

Structs§

PhaseClock
The phase an exchange is in, shared by the exchange and its watcher. Clones share state.
PhasePolicy
The ceilings of every phase, in milliseconds; each must be positive.
ZeroCeiling
A phase policy with a ceiling that is not positive (spec 020, 3.1: construction refuses an incomplete combination).

Enums§

TransportPhases
The transport phase posture of an adapter binding. disabled, the default, keeps spec 009’s one undivided transport timeout.

Functions§

phased
Run fut, an exchange that enters its phases on clock, until it finishes or the current phase’s allowance runs out. An expiry is TransportError::PhaseExpired: transport_unsent when no request byte left the process, transport_interrupted otherwise. Dropping fut on expiry stops every further write. Nothing is retried.