pub struct ReadingReq {Show 21 fields
pub account: Option<String>,
pub cached_input_tokens: Option<i32>,
pub confidence: Option<String>,
pub cost_cents: Option<i32>,
pub cost_limit_cents: Option<i32>,
pub currency: Option<String>,
pub input_tokens: Option<i32>,
pub kind: Option<String>,
pub lane: Option<String>,
pub machine: Option<String>,
pub output_tokens: Option<i32>,
pub plan: Option<String>,
pub provider: Option<String>,
pub requests: Option<i32>,
pub resets_at: Option<String>,
pub synthetic: Option<bool>,
pub total_tokens: Option<i32>,
pub used_pct: Option<f64>,
pub window: Option<String>,
pub window_minutes: Option<i32>,
pub window_start: Option<String>,
}Fields§
§account: Option<String>Account is the provider-side account the sample belongs to.
cached_input_tokens: Option<i32>CachedInputTokens is the window’s cached-prompt-token count.
confidence: Option<String>Confidence says how real the counters are, as the meter graded itself.
cost_cents: Option<i32>CostCents is the window’s spend in cents, as the provider’s meter states it.
cost_limit_cents: Option<i32>CostLimitCents is the window’s spend cap in cents, when the meter knows one.
currency: Option<String>Currency is the ISO currency the cost fields are stated in.
input_tokens: Option<i32>InputTokens is the window’s prompt-token count.
kind: Option<String>Kind is subscription or apikey; anything else is refused.
lane: Option<String>Lane names the meter’s own lane label for this measurement.
machine: Option<String>Machine is the machine the collector observed the account on. Required.
output_tokens: Option<i32>OutputTokens is the window’s completion-token count.
plan: Option<String>Plan is the provider plan label the account is on.
provider: Option<String>Provider is the AI provider whose meter reported this sample. Required.
requests: Option<i32>Requests is the window’s request count.
resets_at: Option<String>ResetsAt is when the window resets, RFC 3339, bounded.
synthetic: Option<bool>Synthetic marks a sample the collector derived rather than observed.
total_tokens: Option<i32>TotalTokens is the window’s total token count.
used_pct: Option<f64>UsedPct is how much of the window’s allowance is consumed, clamped 0..100.
window: Option<String>Window is the window class, one of 6h, day, week, month; anything else is refused rather than silently reclassified.
window_minutes: Option<i32>WindowMinutes is the window’s length as the meter reported it.
window_start: Option<String>WindowStart is when the measured window opened, RFC 3339, bounded to a sane interval around now.
Implementations§
Source§impl ReadingReq
impl ReadingReq
pub fn new() -> ReadingReq
Trait Implementations§
Source§impl Clone for ReadingReq
impl Clone for ReadingReq
Source§fn clone(&self) -> ReadingReq
fn clone(&self) -> ReadingReq
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more