pub struct UsageSnapshot {
pub provider_id: String,
pub account_id: Option<String>,
pub account_label: Option<String>,
pub account_email: Option<String>,
pub collected_at: DateTime<Utc>,
pub primary_rate_window: Option<RateWindow>,
pub secondary_rate_window: Option<RateWindow>,
pub tertiary_rate_window: Option<RateWindow>,
pub extra_rate_windows: Vec<NamedRateWindow>,
pub credits: Option<CreditsSnapshot>,
pub cost: Option<CostSnapshot>,
pub plan: Option<PlanInfo>,
}Expand description
Complete usage snapshot for a provider.
Fields§
§provider_id: String§account_id: Option<String>Account this snapshot was fetched for. None for the implicit single
account (provider with no configured accounts).
account_label: Option<String>Human-friendly account label, when one is configured.
account_email: Option<String>Account email/identity extracted from the provider’s credentials, when
available (e.g. the Codex OAuth id_token). Independent of account_label,
which the registry overwrites with the configured label.
collected_at: DateTime<Utc>§primary_rate_window: Option<RateWindow>§secondary_rate_window: Option<RateWindow>§tertiary_rate_window: Option<RateWindow>§extra_rate_windows: Vec<NamedRateWindow>§credits: Option<CreditsSnapshot>§cost: Option<CostSnapshot>§plan: Option<PlanInfo>Implementations§
Trait Implementations§
Source§impl Clone for UsageSnapshot
impl Clone for UsageSnapshot
Source§impl Debug for UsageSnapshot
impl Debug for UsageSnapshot
Source§impl<'de> Deserialize<'de> for UsageSnapshot
impl<'de> Deserialize<'de> for UsageSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for UsageSnapshot
impl PartialEq for UsageSnapshot
Source§impl Serialize for UsageSnapshot
impl Serialize for UsageSnapshot
impl StructuralPartialEq for UsageSnapshot
Auto Trait Implementations§
impl Freeze for UsageSnapshot
impl RefUnwindSafe for UsageSnapshot
impl Send for UsageSnapshot
impl Sync for UsageSnapshot
impl Unpin for UsageSnapshot
impl UnsafeUnpin for UsageSnapshot
impl UnwindSafe for UsageSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more