1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-29 08:09:18 +02:00

revert generic request parameter for service; support ServerConfig as new factory config

This commit is contained in:
Nikolay Kim
2019-03-09 09:49:11 -08:00
parent aadcdaa3d6
commit fde55ffa14
14 changed files with 581 additions and 460 deletions

View File

@@ -7,6 +7,7 @@ use actix_http::{
};
use actix_rt::System;
use actix_server::{Server, ServerBuilder};
use actix_server_config::ServerConfig;
use actix_service::{IntoNewService, NewService};
use parking_lot::Mutex;
@@ -53,8 +54,8 @@ struct Config {
pub struct HttpServer<F, I, S, B>
where
F: Fn() -> I + Send + Clone + 'static,
I: IntoNewService<S, Request>,
S: NewService<Request>,
I: IntoNewService<S, ServerConfig>,
S: NewService<ServerConfig, Request = Request>,
S::Error: fmt::Debug,
S::Response: Into<Response<B>>,
S::Service: 'static,
@@ -72,8 +73,8 @@ where
impl<F, I, S, B> HttpServer<F, I, S, B>
where
F: Fn() -> I + Send + Clone + 'static,
I: IntoNewService<S, Request>,
S: NewService<Request>,
I: IntoNewService<S, ServerConfig>,
S: NewService<ServerConfig, Request = Request>,
S::Error: fmt::Debug + 'static,
S::Response: Into<Response<B>>,
S::Service: 'static,
@@ -432,8 +433,8 @@ where
impl<F, I, S, B> HttpServer<F, I, S, B>
where
F: Fn() -> I + Send + Clone + 'static,
I: IntoNewService<S, Request>,
S: NewService<Request>,
I: IntoNewService<S, ServerConfig>,
S: NewService<ServerConfig, Request = Request>,
S::Error: fmt::Debug,
S::Response: Into<Response<B>>,
S::Service: 'static,