-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's hard to return HttpServer
or App<AppEntry, Body>
from a function
#1156
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Finding that |
This comment was marked as resolved.
This comment was marked as resolved.
https://actix.rs/docs/application/
|
This comment was marked as resolved.
This comment was marked as resolved.
associated with the app into a separate function for use in the test suite as well as the server program. This didn't work. See: actix/actix-web#1156
configure can't use middeware |
Make sure that you remove semicolon inside closure where you call |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Hope this from the FAQ helps future wanderers to this issue: How can I return App from a function / why is AppEntry private? |
For some reason, I have to return
HttpServer
from a function (say consume aConfig
struct and generate aHttpServer
). But the type signature ofHttpServer
is REALLY HARD for me to return, or even possible. Tons of depending types are private.Even worse, so as
actix_Web::App
.App::new
will returnApp<AppEntry, Body>
, whereAppEntry
is private also... So it is still impossible to return from my function...The text was updated successfully, but these errors were encountered: