pub struct DeepRelaySnapshot {Show 17 fields
pub plan: String,
pub plan_price_cents: Option<i64>,
pub plan_interval: Option<String>,
pub subscribed: bool,
pub cancel_at_period_end: bool,
pub monthly_input: Option<DeepRelayMeter>,
pub monthly_output: Option<DeepRelayMeter>,
pub weekly_input: Option<DeepRelayMeter>,
pub weekly_output: Option<DeepRelayMeter>,
pub backstop_used_usd: Option<f64>,
pub backstop_limit_usd: Option<f64>,
pub searches: Option<(u64, u64)>,
pub payg_calls_24h: Option<u64>,
pub balance_usd: Option<f64>,
pub period_start: Option<DateTime<Utc>>,
pub period_end: Option<DateTime<Utc>>,
pub models: Vec<DeepRelayModelUsage>,
}Expand description
DeepRelay — a monthly plan with four weighted-token meters, a dollar usage ceiling, and an optional pay-as-you-go wallet.
The monthly meters reset at the end of the billing period. The weekly caps
roll (seven days, no reset instant), so a None reset there is the
vendor’s answer, not missing data.
Fields§
§plan: Stringplan.name, or “Pay as you go” when the organization has no plan.
plan_price_cents: Option<i64>§plan_interval: Option<String>"month", "3 months", … — already pluralized from interval_count.
subscribed: bool§cancel_at_period_end: bool§monthly_input: Option<DeepRelayMeter>§monthly_output: Option<DeepRelayMeter>§weekly_input: Option<DeepRelayMeter>§weekly_output: Option<DeepRelayMeter>§backstop_used_usd: Option<f64>Plan spend against the per-period usage ceiling, in dollars.
backstop_limit_usd: Option<f64>§searches: Option<(u64, u64)>(used, included) web searches this period.
payg_calls_24h: Option<u64>Calls billed to the wallet in the last 24 h while subscribed.
balance_usd: Option<f64>Wallet balance in dollars. Absent unless the balance request was made and answered.
period_start: Option<DateTime<Utc>>§period_end: Option<DateTime<Utc>>§models: Vec<DeepRelayModelUsage>Implementations§
Source§impl DeepRelaySnapshot
impl DeepRelaySnapshot
Sourcepub fn monthly_worst(&self) -> Option<&DeepRelayMeter>
pub fn monthly_worst(&self) -> Option<&DeepRelayMeter>
The monthly meter closest to its ceiling — the one that will cap the account. Drives the bar headline, its severity class and the TUI overview cell.
Sourcepub fn weekly_worst(&self) -> Option<&DeepRelayMeter>
pub fn weekly_worst(&self) -> Option<&DeepRelayMeter>
The rolling-weekly meter closest to its ceiling.
Sourcepub fn monthly_window(&self) -> Option<UsageWindow>
pub fn monthly_window(&self) -> Option<UsageWindow>
Monthly allowance as the shared window shape, for --format pacing.
Both period ends come from the server, so the length is exact rather
than a guessed “30 days” — but the report still exposes no window_secs
for these rows (they go through push_metric), because a frontend reads
that field as a rolling window. Pacing here is local to a placeholder.
Sourcepub fn weekly_window(&self) -> Option<UsageWindow>
pub fn weekly_window(&self) -> Option<UsageWindow>
Rolling weekly caps as the shared window shape. The window rolls, so it carries no reset instant; pacing stays neutral rather than guessing.
Trait Implementations§
Source§impl Clone for DeepRelaySnapshot
impl Clone for DeepRelaySnapshot
Source§impl Debug for DeepRelaySnapshot
impl Debug for DeepRelaySnapshot
impl Eq for DeepRelaySnapshot
Source§impl PartialEq for DeepRelaySnapshot
impl PartialEq for DeepRelaySnapshot
impl StructuralPartialEq for DeepRelaySnapshot
Auto Trait Implementations§
impl Freeze for DeepRelaySnapshot
impl RefUnwindSafe for DeepRelaySnapshot
impl Send for DeepRelaySnapshot
impl Sync for DeepRelaySnapshot
impl Unpin for DeepRelaySnapshot
impl UnsafeUnpin for DeepRelaySnapshot
impl UnwindSafe for DeepRelaySnapshot
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