pub trait LoadBalancerTrait {
type Element;
type Error;
type Future: Future<Output = Result<Option<Self::Element>, Self::Error>>;
// Required method
fn choose(&self, extensions: &mut Extensions) -> Self::Future;
// Provided method
fn boxed(self) -> BoxLoadBalancer<Self::Element, Self::Error>
where Self: Sized + Send + Sync + 'static,
Self::Future: Send + 'static { ... }
}Required Associated Types§
Required Methods§
Sourcefn choose(&self, extensions: &mut Extensions) -> Self::Future
fn choose(&self, extensions: &mut Extensions) -> Self::Future
load balancer choose a effect element