LoadBalancer

Trait LoadBalancer 

Source
pub trait LoadBalancer<T>:
    Send
    + Sync
    + Clone
    + 'static {
    // Required methods
    fn alloc(&self) -> impl Future<Output = T> + Send;
    fn try_alloc(&self) -> Option<T>;
}

Required Methods§

Source

fn alloc(&self) -> impl Future<Output = T> + Send

Source

fn try_alloc(&self) -> Option<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl LoadBalancer<String> for ProxyPool

Source§

impl<T> LoadBalancer<T> for GeneralLoadBalancer<T>
where T: Send + Sync + Clone + 'static,

Source§

impl<T> LoadBalancer<T> for IntervalLoadBalancer<T>
where T: Send + Sync + Clone + 'static,

Source§

impl<T> LoadBalancer<T> for LimitLoadBalancer<T>
where T: Send + Sync + Clone + 'static,

Source§

impl<T> LoadBalancer<T> for RandomLoadBalancer<T>
where T: Send + Sync + Clone + 'static,

Source§

impl<T> LoadBalancer<T> for SimpleLoadBalancer<T>
where T: Send + Sync + Clone + 'static,

Source§

impl<T> LoadBalancer<T> for ThresholdLoadBalancer<T>
where T: Clone + Send + Sync + 'static,