pub struct ProviderTotals<S> {
pub claude: S,
pub codex: S,
pub copilot: S,
pub gemini: S,
pub opencode: S,
pub cursor: S,
pub hermes: S,
pub grok: S,
pub overall: S,
}Expand description
Per-provider totals organized by AI provider.
Keeps each provider’s running totals alongside an overall “All Providers”
bucket. The S parameter is the per-provider stats type each feature
supplies (e.g. ProviderStats for usage, AnalysisProviderStats for
analysis).
Fields§
§claude: STotals for Claude Code sessions.
codex: STotals for OpenAI Codex sessions.
copilot: STotals for GitHub Copilot CLI sessions.
gemini: STotals for Gemini CLI sessions.
opencode: STotals for OpenCode sessions.
cursor: STotals for Cursor sessions.
hermes: STotals for Hermes sessions.
grok: STotals for Grok CLI sessions.
overall: SSum across every provider (the “All Providers” bucket).
Implementations§
Source§impl<S> ProviderTotals<S>
impl<S> ProviderTotals<S>
Sourcepub fn get_stats(&self, provider: Provider) -> &S
pub fn get_stats(&self, provider: Provider) -> &S
Borrows the stats bucket for provider.
Provider::Unknown maps to the overall bucket, since there is no
dedicated slot for unclassified providers.
Sourcepub fn get_stats_mut(&mut self, provider: Provider) -> &mut S
pub fn get_stats_mut(&mut self, provider: Provider) -> &mut S
Mutably borrows the stats bucket for provider.
Provider::Unknown maps to the overall bucket, since there is no
dedicated slot for unclassified providers.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for ProviderTotals<S>where
S: Freeze,
impl<S> RefUnwindSafe for ProviderTotals<S>where
S: RefUnwindSafe,
impl<S> Send for ProviderTotals<S>where
S: Send,
impl<S> Sync for ProviderTotals<S>where
S: Sync,
impl<S> Unpin for ProviderTotals<S>where
S: Unpin,
impl<S> UnsafeUnpin for ProviderTotals<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for ProviderTotals<S>where
S: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more