pub struct Entry<T>{
pub interval: Duration,
pub last: Mutex<Option<Instant>>,
pub value: T,
}Expand description
A single entry in the cooldown load balancer.
Each entry tracks the minimum reuse interval, the last allocation timestamp, and the associated value.
Fields§
§interval: DurationMinimum duration before this entry can be reused.
last: Mutex<Option<Instant>>Timestamp of the last allocation (None if never used).
value: TThe underlying resource value.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Entry<T>
impl<T> !RefUnwindSafe for Entry<T>
impl<T> !UnwindSafe for Entry<T>
impl<T> Send for Entry<T>
impl<T> Sync for Entry<T>
impl<T> Unpin for Entry<T>where
T: Unpin,
impl<T> UnsafeUnpin for Entry<T>where
T: UnsafeUnpin,
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