pub struct RoundRobinCounter(/* private fields */);Expand description
Thread-safe, Clone-able counter for distributing reads across replicas.
Wrap in Arc on your AppState to share across handlers.
Implementations§
Trait Implementations§
Source§impl Clone for RoundRobinCounter
impl Clone for RoundRobinCounter
Source§fn clone(&self) -> RoundRobinCounter
fn clone(&self) -> RoundRobinCounter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoundRobinCounter
impl Debug for RoundRobinCounter
Source§impl Default for RoundRobinCounter
impl Default for RoundRobinCounter
Source§fn default() -> RoundRobinCounter
fn default() -> RoundRobinCounter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RoundRobinCounter
impl RefUnwindSafe for RoundRobinCounter
impl Send for RoundRobinCounter
impl Sync for RoundRobinCounter
impl Unpin for RoundRobinCounter
impl UnsafeUnpin for RoundRobinCounter
impl UnwindSafe for RoundRobinCounter
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