pub struct WindowLoadBalancerRef<T>{
pub entries: RwLock<Vec<Entry<T>>>,
pub timer: Mutex<Option<JoinHandle<()>>>,
pub interval: RwLock<Duration>,
pub next_reset: RwLock<Instant>,
}Expand description
Internal reference structure for LimitLoadBalancer.
Holds the entries and the interval timer.
Fields§
§entries: RwLock<Vec<Entry<T>>>The entries managed by this load balancer.
timer: Mutex<Option<JoinHandle<()>>>Timer task handle for resetting counts periodically.
interval: RwLock<Duration>The interval at which counts are reset.
next_reset: RwLock<Instant>The next scheduled reset time.
Auto Trait Implementations§
impl<T> !Freeze for WindowLoadBalancerRef<T>
impl<T> !RefUnwindSafe for WindowLoadBalancerRef<T>
impl<T> Send for WindowLoadBalancerRef<T>
impl<T> Sync for WindowLoadBalancerRef<T>
impl<T> Unpin for WindowLoadBalancerRef<T>where
T: Unpin,
impl<T> !UnwindSafe for WindowLoadBalancerRef<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more