pub trait SupplyConstraint {
// Required methods
fn max_admissible_inflight(&self) -> usize;
fn backoff_hint(&self) -> Option<Backoff>;
}Expand description
The SURB-supply ceiling. Down-only: it may cap or shrink the window, never open it.
This is the anti-grief governor. A healthy buffer returns backoff_hint
None — it does not mean “go faster”; only DeliverySignal can authorize that.
Required Methods§
Sourcefn max_admissible_inflight(&self) -> usize
fn max_admissible_inflight(&self) -> usize
Maximum in-flight bytes the current SURB stock can support
(buffer_level × bytes_per_reply_packet). The window is capped to this.
Sourcefn backoff_hint(&self) -> Option<Backoff>
fn backoff_hint(&self) -> Option<Backoff>
Backoff request derived from SURB distress signals. None when the buffer is healthy —
never a signal to open the window.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".