Trait UpstreamSelector

Source
pub trait UpstreamSelector:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn determine_upstream(&self, conn: &mut Conn) -> Option<Url>;

    // Provided method
    fn boxed(self) -> Box<dyn UpstreamSelector>
       where Self: Sized { ... }
}
Expand description

a trait for selecting the correct upstream

Required Methods§

Source

fn determine_upstream(&self, conn: &mut Conn) -> Option<Url>

does what it says on the label

Provided Methods§

Source

fn boxed(self) -> Box<dyn UpstreamSelector>
where Self: Sized,

turn self into a Box<dyn UpstreamSelector>

Trait Implementations§

Source§

impl UpstreamSelector for Box<dyn UpstreamSelector>

Source§

fn determine_upstream(&self, conn: &mut Conn) -> Option<Url>

does what it says on the label
Source§

fn boxed(self) -> Box<dyn UpstreamSelector>

turn self into a Box<dyn UpstreamSelector>

Implementations on Foreign Types§

Source§

impl UpstreamSelector for Box<dyn UpstreamSelector>

Source§

fn determine_upstream(&self, conn: &mut Conn) -> Option<Url>

Source§

fn boxed(self) -> Box<dyn UpstreamSelector>

Implementors§