usetower_service::Service;usecrate::error::Error;usecrate::param::Param;/// A route is a [`Service`][1] that has a [`Param`] to determine wether the
/// service should be called or not.
////// [1]: https://docs.rs/tower-service/0.3/tower_service/trait.Service.html
pubtraitRoute<T>: Service<T> {/// The associated param to determine wether this route is match or not.
typeParam:Param<T>;/// Implementors should call this after obtaining `Param` in `Service`'s
/// call.
fncall_with_param(&mutself, req: T, param:Self::Param)->Self::Future;/// A helper method to obtain `Param` in `Service`'s call.
////// Without this, you'll have to write something like:
////// ```ignored
/// <Self as Route<T>>::Param::from_request(&req);
/// ```
#[inline]fnparam(&self, req:&T)->Result<Self::Param, Error>{Self::Param::from_request(req)}}