Trait DynServiceMatcher
pub trait DynServiceMatcher<Input>:
Send
+ Sync
+ 'static {
type Service: Send + 'static;
type Error: Send + 'static;
type ModifiedInput: Send + 'static;
// Required method
fn match_service_box(
&self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<ServiceMatch<Self::ModifiedInput, Self::Service>, Self::Error>> + Send + '_>>;
}Expand description
Dynamic-dispatch interface for ServiceMatcher.
This is mainly useful behind BoxServiceMatcher, but is public so
crates building their own matcher containers can reuse the same pattern.
Required Associated Types§
type ModifiedInput: Send + 'static
type ModifiedInput: Send + 'static
The input after matcher evaluation.
Required Methods§
fn match_service_box(
&self,
input: Input,
) -> Pin<Box<dyn Future<Output = Result<ServiceMatch<Self::ModifiedInput, Self::Service>, Self::Error>> + Send + '_>>
fn match_service_box( &self, input: Input, ) -> Pin<Box<dyn Future<Output = Result<ServiceMatch<Self::ModifiedInput, Self::Service>, Self::Error>> + Send + '_>>
Attempt to select a service for input.