pub struct CallCeiling {
pub credit: u64,
pub max_items: u64,
pub max_bytes: u64,
pub max_buffered: u64,
}Expand description
What one call may take in (BIDIR-1: “every item that flows has a limit”). Beside the transport’s per-connection call count, which counts a duplex call as one call.
BIDIR-6, the owner’s decision: nothing limits what has passed through a
call unless its method opts in (64 MiB is 56 minutes of 16 kHz PCM). What a
call costs is what it holds, so what is bounded is what it holds: credit
items, and past max_buffered bytes no more credit until the handler
drains below it. An obedient client is slowed, never ended (owner,
2026-11-02).
Fields§
§credit: u64Credit granted with the call’s answer: items the caller may send before the callee grants more, and so the items it can hold. The callee’s window, not a policy: it moves as the handler consumes.
max_items: u64Input items over the call’s life. u64::MAX (the default): no limit.
max_bytes: u64Input bytes over the call’s life (each item as its JSON). u64::MAX
(the default): no limit.
max_buffered: u64Input bytes held at once (received and not yet consumed) past which the callee grants no credit until it drains below them. Not a refusal: a client within its credit may still land up to a window’s items.