pub struct UsageTotals {
pub requests: i64,
pub cost_usd: f64,
pub saved_usd: f64,
pub reference_cost_usd: f64,
pub active_persons: i64,
pub measured_requests: i64,
pub estimated_requests: i64,
pub projection_seats: Option<u32>,
pub projection_usd_per_month: Option<f64>,
}Expand description
Aggregate totals + the seat projection over the queried window.
Fields§
§requests: i64§cost_usd: f64§saved_usd: f64§reference_cost_usd: f64Reference (avoided-cost) sum for the window, when a reference_model
is configured (enterprise#15/#18); 0.0 otherwise.
active_persons: i64Distinct persons with ≥1 event in the window — the projection divisor.
measured_requests: i64Requests billed at the provider’s own reported charge (#1179).
estimated_requests: i64Requests whose cost is a heuristic estimate (no exact/live price).
projection_seats: Option<u32>saved_usd / active_persons × seats, scaled to a 30-day month
(enterprise#20, Doc 04): “if every configured seat saved like the
currently active users, this is the monthly org-wide savings”.
None when no seats are configured or nothing is active — the
cockpit never invents a projection.
projection_usd_per_month: Option<f64>Trait Implementations§
Source§impl Clone for UsageTotals
impl Clone for UsageTotals
Source§fn clone(&self) -> UsageTotals
fn clone(&self) -> UsageTotals
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 UsageTotals
impl Debug for UsageTotals
Source§impl<'de> Deserialize<'de> for UsageTotals
impl<'de> Deserialize<'de> for UsageTotals
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 UsageTotals
impl PartialEq for UsageTotals
Source§impl Serialize for UsageTotals
impl Serialize for UsageTotals
impl StructuralPartialEq for UsageTotals
Auto Trait Implementations§
impl Freeze for UsageTotals
impl RefUnwindSafe for UsageTotals
impl Send for UsageTotals
impl Sync for UsageTotals
impl Unpin for UsageTotals
impl UnsafeUnpin for UsageTotals
impl UnwindSafe for UsageTotals
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
Converts
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>
Converts
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