pub struct Meter {
pub status: String,
pub percent: f64,
pub used: f64,
pub quota: f64,
pub resets_at: Option<String>,
/* private fields */
}Fields§
§status: Stringok / exceeded — ARK reports no status, so it is derived from percent.
percent: f64The server’s own percentage, as served.
used: f64§quota: f64§resets_at: Option<String>The raw instant, for JSON and the header.
Implementations§
Source§impl Meter
impl Meter
pub fn from_parts( status: &str, percent: f64, used: f64, quota: f64, resets_at: Option<&str>, offset_secs: Option<i64>, ) -> Self
pub fn reset_ms(&self) -> Option<i64>
Sourcepub fn offset_secs(&self) -> i64
pub fn offset_secs(&self) -> i64
The server’s UTC offset for this window, seconds east-positive.
pub fn exceeded(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Meter
impl RefUnwindSafe for Meter
impl Send for Meter
impl Sync for Meter
impl Unpin for Meter
impl UnsafeUnpin for Meter
impl UnwindSafe for Meter
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