[][src]Struct cdrs::load_balancing::Random

pub struct Random<N> {
    pub cluster: Vec<N>,
}

Fields

cluster: Vec<N>

Methods

impl<N> Random<N>[src]

pub fn new(cluster: Vec<N>) -> Self[src]

Trait Implementations

impl<N> LoadBalancingStrategy<N> for Random<N>[src]

fn next(&self) -> Option<&N>[src]

Returns next random node from a cluster

impl<N> From<Vec<N>> for Random<N>[src]

Auto Trait Implementations

impl<N> Send for Random<N> where
    N: Send

impl<N> Unpin for Random<N> where
    N: Unpin

impl<N> Sync for Random<N> where
    N: Sync

impl<N> UnwindSafe for Random<N> where
    N: UnwindSafe

impl<N> RefUnwindSafe for Random<N> where
    N: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]