pub struct UsageWarning {
pub rid: Option<String>,
pub budget: String,
pub message: String,
pub current_cost: f64,
pub cost_limit: f64,
pub percent_used: f64,
pub crossed_warn_at: Vec<f64>,
pub period: String,
pub period_start: String,
pub reset_at: String,
pub reset_at_display: String,
}Expand description
A configured usage budget crossed one or more warning thresholds.
Fields§
§rid: Option<String>§budget: StringConfigured budget name.
message: StringHuman-readable warning text.
current_cost: f64Current spend for the budget window.
cost_limit: f64Configured budget limit.
percent_used: f64Fraction used, e.g. 0.8 for 80%.
crossed_warn_at: Vec<f64>Newly crossed warning thresholds, as fractions.
period: StringCalendar period name.
period_start: StringRFC3339 period start.
reset_at: StringRFC3339 reset/end time.
reset_at_display: Stringreset_at rendered in the daemon’s local time as YYYY-MM-DD HH:MM AM|PM.
Clients that surface this string verbatim should prefer it over reset_at
(which is UTC); the structured reset_at stays for machine consumers.
Trait Implementations§
Source§impl Clone for UsageWarning
impl Clone for UsageWarning
Source§fn clone(&self) -> UsageWarning
fn clone(&self) -> UsageWarning
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 UsageWarning
impl Debug for UsageWarning
Source§impl<'de> Deserialize<'de> for UsageWarning
impl<'de> Deserialize<'de> for UsageWarning
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
Auto Trait Implementations§
impl Freeze for UsageWarning
impl RefUnwindSafe for UsageWarning
impl Send for UsageWarning
impl Sync for UsageWarning
impl Unpin for UsageWarning
impl UnsafeUnpin for UsageWarning
impl UnwindSafe for UsageWarning
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