pub struct OpenAiSnapshot {
pub plan: String,
pub session: Option<UsageWindow>,
pub weekly: Option<UsageWindow>,
pub code_review: Option<UsageWindow>,
pub additional_limits: Vec<OpenAiNamedLimit>,
pub unavailable_models: Vec<OpenAiUnavailableModel>,
pub credits: Option<OpenAiCredits>,
pub reset_credits: ResetCredits,
pub source: OpenAiSource,
}Expand description
OpenAI Codex OAuth — exposes whichever rolling windows the API reports.
Fields§
§plan: String§session: Option<UsageWindow>5h window, identified by its duration rather than its wire position.
weekly: Option<UsageWindow>7d window, identified by its duration rather than its wire position.
code_review: Option<UsageWindow>Optional 7d code-review bucket.
additional_limits: Vec<OpenAiNamedLimit>Named limits beside the main one, each with its own windows. Empty for an account that has none.
Models the account currently cannot dispatch to, with the time they return when the API states one. Only unavailable models are kept: a list of everything that is working is noise, and the reason this exists is to explain a refusal no percentage accounts for.
credits: Option<OpenAiCredits>Optional credit balance + approximate message-count ranges.
reset_credits: ResetCredits§source: OpenAiSourceSource of the snapshot — Codex OAuth vs admin-key fallback. Drives the placeholder set and the “OpenAI does not expose this for Plus” tooltip when the OAuth path isn’t available.
Trait Implementations§
Source§impl Clone for OpenAiSnapshot
impl Clone for OpenAiSnapshot
Source§fn clone(&self) -> OpenAiSnapshot
fn clone(&self) -> OpenAiSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OpenAiSnapshot
impl Debug for OpenAiSnapshot
impl Eq for OpenAiSnapshot
Source§impl PartialEq for OpenAiSnapshot
impl PartialEq for OpenAiSnapshot
impl StructuralPartialEq for OpenAiSnapshot
Auto Trait Implementations§
impl Freeze for OpenAiSnapshot
impl RefUnwindSafe for OpenAiSnapshot
impl Send for OpenAiSnapshot
impl Sync for OpenAiSnapshot
impl Unpin for OpenAiSnapshot
impl UnsafeUnpin for OpenAiSnapshot
impl UnwindSafe for OpenAiSnapshot
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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