pub struct WindowSnapshot {
pub name: String,
pub duration: Duration,
pub tokens_used: u64,
pub usd_used: f64,
pub token_cap: Option<u64>,
pub usd_cap: Option<f64>,
pub entry_count: usize,
}Expand description
Immutable snapshot of one window’s current totals.
Fields§
§name: StringWindow name.
duration: DurationWindow duration.
tokens_used: u64Tokens currently inside the window.
usd_used: f64USD currently inside the window.
token_cap: Option<u64>Configured token cap, if any.
usd_cap: Option<f64>Configured USD cap, if any.
entry_count: usizeHow many discrete records currently fall in the window.
Trait Implementations§
Source§impl Clone for WindowSnapshot
impl Clone for WindowSnapshot
Source§fn clone(&self) -> WindowSnapshot
fn clone(&self) -> WindowSnapshot
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 moreAuto Trait Implementations§
impl Freeze for WindowSnapshot
impl RefUnwindSafe for WindowSnapshot
impl Send for WindowSnapshot
impl Sync for WindowSnapshot
impl Unpin for WindowSnapshot
impl UnsafeUnpin for WindowSnapshot
impl UnwindSafe for WindowSnapshot
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