Router

Trait Router 

Source
pub trait Router<B> {
    type Service;
    type Error;

    // Required method
    fn match_route(
        &self,
        request: &Request<B>,
    ) -> Result<Self::Service, Self::Error>;
}
Expand description

An interface for retrieving an inner [Service] given a [http::Request].

Required Associated Types§

Required Methods§

Source

fn match_route( &self, request: &Request<B>, ) -> Result<Self::Service, Self::Error>

Matches a [http::Request] to a target [Service].

Implementors§