Trait tower::steer::Picker[][src]

pub trait Picker<S, Req> {
    fn pick(&mut self, r: &Req, services: &[S]) -> usize;
This is supported on crate feature steer only.

This is how callers of Steer tell it which Service a Req corresponds to.

Required methods

fn pick(&mut self, r: &Req, services: &[S]) -> usize[src]

Return an index into the iterator of Service passed to Steer::new.

Loading content...


impl<S, F, Req> Picker<S, Req> for F where
    F: Fn(&Req, &[S]) -> usize

Loading content...