pub trait FilteredLoadBalancer<T>:
Send
+ Sync
+ Clone
+ 'static {
// Required methods
fn alloc_filter(
&self,
predicate: impl FnMut((usize, &T)) -> bool + Send,
) -> impl Future<Output = (usize, T)> + Send;
fn try_alloc_filter(
&self,
predicate: impl FnMut((usize, &T)) -> bool,
) -> Option<(usize, T)>;
}Expand description
A load balancer that supports predicate-based filtering during allocation.
Unlike LoadBalancer, filter methods return (usize, T) so callers
can identify the allocated entry (e.g. for error feedback).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".