Looking at these two methods:
fn m1<T: 'static + Fn(&Request) -> Response + Send + Sync>(&mut self, handler: T) {
// It is not important
}
// Same trait bound to the generic
fn m2<T: 'static + Fn(&Request) -> Response + Send + Sync>(&mut self, handler: T) {
// It is not important
}
Both share the same bound:
<T: 'static + Fn(&Request) -> Response + Send + Sync>
Can I "factorize" this? I tried to search the docs, but maybe I'm not using the right words. Can someone redirect me to the relevant part of the docs (or write an answer here if needed)?