From ef0fac4933287ca2580000a4addfde694c606701 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Tue, 25 Aug 2026 01:00:41 +0100 Subject: [PATCH] feat(arr): let backends report billed characters --- crates/arr-subs/src/translate.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/arr-subs/src/translate.rs b/crates/arr-subs/src/translate.rs index 2fa8345..4114a90 100644 --- a/crates/arr-subs/src/translate.rs +++ b/crates/arr-subs/src/translate.rs @@ -128,6 +128,15 @@ pub trait Backend: fmt::Debug + Send + Sync { BATCH_CHAR_BUDGET } + /// Characters this backend has billed so far, cumulative over its life. + /// + /// Translators charge per character (DESIGN.md ยง15); the daily budget + /// (#197) spends against what was actually billed rather than an + /// estimate of it. A backend that cannot say reports zero. + fn characters_billed(&self) -> u64 { + 0 + } + /// Translate one batch. /// /// The reply is expected to carry every cue number the batch carried,