pub struct LimitLoadBalancerRef<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 LimitLoadBalancerRef<T>
impl<T> !RefUnwindSafe for LimitLoadBalancerRef<T>
impl<T> Send for LimitLoadBalancerRef<T>
impl<T> Sync for LimitLoadBalancerRef<T>
impl<T> Unpin for LimitLoadBalancerRef<T>where
T: Unpin,
impl<T> !UnwindSafe for LimitLoadBalancerRef<T>
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