pub struct ProviderUsage {
pub provider: String,
pub account: Option<String>,
pub source: Option<String>,
pub account_info: Option<AccountInfo>,
pub fetched_at: Option<String>,
pub saved_resets: Option<SavedResets>,
pub usage: Option<Usage>,
pub error: Option<String>,
}Expand description
One provider/account’s usage entry. The /usage response is an array of
these. A fetch failure becomes an entry carrying error (silent-degrade),
never a failure of the whole array.
Fields§
§provider: StringCodexBar provider name (e.g. “codex”), which consumers map to their own id.
account: Option<String>§source: Option<String>Which retrieval path produced this (e.g. “oauth”) — observability only.
account_info: Option<AccountInfo>§fetched_at: Option<String>§saved_resets: Option<SavedResets>§usage: Option<Usage>§error: Option<String>Present only on a degraded entry. The consumer skips any entry with a
truthy error.
Implementations§
Trait Implementations§
Source§impl Clone for ProviderUsage
impl Clone for ProviderUsage
Source§fn clone(&self) -> ProviderUsage
fn clone(&self) -> ProviderUsage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProviderUsage
impl Debug for ProviderUsage
Source§impl<'de> Deserialize<'de> for ProviderUsage
impl<'de> Deserialize<'de> for ProviderUsage
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 ProviderUsage
impl PartialEq for ProviderUsage
Source§impl Serialize for ProviderUsage
impl Serialize for ProviderUsage
impl StructuralPartialEq for ProviderUsage
Auto Trait Implementations§
impl Freeze for ProviderUsage
impl RefUnwindSafe for ProviderUsage
impl Send for ProviderUsage
impl Sync for ProviderUsage
impl Unpin for ProviderUsage
impl UnsafeUnpin for ProviderUsage
impl UnwindSafe for ProviderUsage
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