pub struct Random;Expand description
Picks a random instance each time.
Trait Implementations§
Source§impl LoadBalancer for Random
impl LoadBalancer for Random
Source§fn pick<'a>(
&self,
instances: &'a [ServiceInstance],
) -> Option<&'a ServiceInstance>
fn pick<'a>( &self, instances: &'a [ServiceInstance], ) -> Option<&'a ServiceInstance>
Select an instance, or
None if the slice is empty.Auto Trait Implementations§
impl Freeze for Random
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnsafeUnpin for Random
impl UnwindSafe for Random
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