pub struct ThresholdLoadBalancerRef<T>{
pub entries: RwLock<Vec<Entry<T>>>,
pub timer: Mutex<Option<JoinHandle<()>>>,
pub interval: RwLock<Duration>,
pub next_reset: RwLock<Instant>,
}Expand description
Internal representation of the threshold load balancer.
Fields§
§entries: RwLock<Vec<Entry<T>>>List of entries to balance between.
timer: Mutex<Option<JoinHandle<()>>>Optional background timer handle for resetting counts periodically.
interval: RwLock<Duration>Interval duration for resetting counts.
next_reset: RwLock<Instant>The next scheduled reset time.
Auto Trait Implementations§
impl<T> !Freeze for ThresholdLoadBalancerRef<T>
impl<T> !RefUnwindSafe for ThresholdLoadBalancerRef<T>
impl<T> Send for ThresholdLoadBalancerRef<T>
impl<T> Sync for ThresholdLoadBalancerRef<T>
impl<T> Unpin for ThresholdLoadBalancerRef<T>where
T: Unpin,
impl<T> !UnwindSafe for ThresholdLoadBalancerRef<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