pub struct EpochCarry {
pub ledger_usd: f64,
pub pings: u32,
pub prefix_tokens: u64,
pub ping_input: u64,
pub idle_since: Instant,
pub idle_wall: SystemTime,
}Expand description
What a cache epoch carries from one period to the next. An epoch is the
life of one real request’s cache entry: only a new real request (new
usage, new anchor) starts a fresh one. Ending a period (e.g. /keepwarm off) and starting another without a real turn in between CONTINUES the
epoch: same ledger, same idle start, ping 1’s write allowance not
re-granted.
Fields§
§ledger_usd: f64§pings: u32§prefix_tokens: u64§ping_input: u64§idle_since: Instant§idle_wall: SystemTimeTrait Implementations§
Source§impl Clone for EpochCarry
impl Clone for EpochCarry
impl Copy for EpochCarry
Source§impl Debug for EpochCarry
impl Debug for EpochCarry
Source§impl PartialEq for EpochCarry
impl PartialEq for EpochCarry
impl StructuralPartialEq for EpochCarry
Auto Trait Implementations§
impl Freeze for EpochCarry
impl RefUnwindSafe for EpochCarry
impl Send for EpochCarry
impl Sync for EpochCarry
impl Unpin for EpochCarry
impl UnsafeUnpin for EpochCarry
impl UnwindSafe for EpochCarry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.