pub enum FreeReason {
Discovery,
InterimInputRequired,
TaskCreated,
TaskInProgress,
TaskNotDelivered,
TaskDrive,
MissingTaskAttribution,
MissingTaskId,
Subscription,
ProtocolError,
UnrecognizedResult,
}Expand description
Why a call was not billed. Kept specific so an operator answering “why is my bill lower than my request count” gets a real answer from the metrics.
Variants§
Discovery
tools/list and friends: the cost of connecting, not of work.
InterimInputRequired
An interim input_required result. Nothing delivered yet.
TaskCreated
A CreateTaskResult: work accepted, not performed.
TaskInProgress
A poll of a task still working or awaiting input.
TaskNotDelivered
A task that reached a terminal state without delivering: failed, cancelled.
TaskDrive
tasks/update or tasks/cancel: driving a task, not receiving its output.
MissingTaskAttribution
A completed task could not be joined to the call that created it.
MissingTaskId
A completed task omitted its required durable identifier, so repeat polls could not be made idempotent.
Subscription
A subscriptions/listen stream. Not a discrete call; see the findings doc.
ProtocolError
A JSON-RPC error. The server did not deliver.
UnrecognizedResult
A result shape this build does not recognize. Fails toward not charging.
Implementations§
Source§impl FreeReason
impl FreeReason
Sourcepub const ALL: [Self; 11]
pub const ALL: [Self; 11]
Every reason, in a stable order.
Callers index metric slots by position, so appending is safe and reordering is not.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The stable wire name.
One spelling per variant, defined here so metrics, bindings and the conformance vectors cannot drift into three different answers for the same reason. Written out rather than derived from the identifier: a rename must not silently change what an operator’s dashboard or a caller’s branch is keyed on.