-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Can't have multiple Applications on a single server with different state #49
Comments
You have to manually box applications, something like: HttpServer::new(|| vec![
Box::new(Application::<State1>::new().finish()),
Box::new(Application::<State2>::new().finish()),
Box::new(Application::<State3>::new().finish())]) maybe application should have convenience method. |
once you box the application, it doesn't implement
|
you are right! thanks for report |
error with app with state and no state. such like
|
I don't think this is currently possible, but please correct me if I'm wrong.
HttpServer::new()
requires an iterator ofApplication
s (something that implementsIntoHttpHandler
)Since the
Application
has a generic State parameter, if you have applications with a different type for State, you can't create an iterator over these different types.The text was updated successfully, but these errors were encountered: