pub struct UsageEstimate {
pub cost_today: f64,
pub cost_week: f64,
pub cost_month: f64,
pub plan: SubscriptionPlan,
pub budget_usd: Option<f64>,
}Expand description
Estimated usage metrics
Fields§
§cost_today: f64Cost today in USD
cost_week: f64Cost this week in USD
cost_month: f64Cost this month in USD
plan: SubscriptionPlanSubscription plan
budget_usd: Option<f64>Monthly budget (if applicable)
Implementations§
Source§impl UsageEstimate
impl UsageEstimate
Sourcepub fn percent_today(&self) -> Option<f64>
pub fn percent_today(&self) -> Option<f64>
Calculate percentage used for today (if budget exists)
Sourcepub fn percent_week(&self) -> Option<f64>
pub fn percent_week(&self) -> Option<f64>
Calculate percentage used for week (if budget exists)
Sourcepub fn percent_month(&self) -> Option<f64>
pub fn percent_month(&self) -> Option<f64>
Calculate percentage used for month (if budget exists)
Trait Implementations§
Source§impl Clone for UsageEstimate
impl Clone for UsageEstimate
Source§fn clone(&self) -> UsageEstimate
fn clone(&self) -> UsageEstimate
Returns a duplicate of the value. Read more
1.0.0 · 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 UsageEstimate
impl Debug for UsageEstimate
Source§impl Default for UsageEstimate
impl Default for UsageEstimate
Source§fn default() -> UsageEstimate
fn default() -> UsageEstimate
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UsageEstimate
impl RefUnwindSafe for UsageEstimate
impl Send for UsageEstimate
impl Sync for UsageEstimate
impl Unpin for UsageEstimate
impl UnsafeUnpin for UsageEstimate
impl UnwindSafe for UsageEstimate
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