Let's look at this documentation, taken from actix-web docs.
As we see on the docs, when we call
HttpServer::new(factory: F) function, it takes an argument with generic type
F was explained in
where clause. When I read what is
F, it's very confusing since
F was related to many traits.
Fortunately, the docs gives an example, so I know what should be injected to
F which is closure that return a call from
App::new().service(web::resource("/").to(|| HttpResponse::Ok())). That can be done because it's satisfy
But what if I want to explore possibilities that I can inject into
F? How do I know what else that satisfy
F just from read the API docs? I feel that this is really difficult.
Note that this problem can be applied to any docs, not just actix-web. Actix-web is just an example for what I'm facing currently.