pub trait Upstreams: Send + Sync + 'static {
    type Error;

    // Required method
    fn elect(&self) -> Result<&str, Self::Error>;
}
Expand description

Upstreams trait.

Required Associated Types§

source

type Error

Error type.

Required Methods§

source

fn elect(&self) -> Result<&str, Self::Error>

Elect a upstream to process current request.

Implementations on Foreign Types§

source§

impl Upstreams for String

§

type Error = Infallible

source§

fn elect(&self) -> Result<&str, Self::Error>

source§

impl<T> Upstreams for Vec<T>where T: AsRef<str> + Send + Sync + 'static,

§

type Error = Error

source§

fn elect(&self) -> Result<&str, Self::Error>

source§

impl<const N: usize> Upstreams for [&'static str; N]

§

type Error = Error

source§

fn elect(&self) -> Result<&str, Self::Error>

source§

impl Upstreams for &'static str

§

type Error = Infallible

source§

fn elect(&self) -> Result<&str, Self::Error>

Implementors§