Function oe_rpc_servers::start_http_with_middleware
source · [−]pub fn start_http_with_middleware<M, S, H, T, R>(
addr: &SocketAddr,
cors_domains: DomainsValidation<AccessControlAllowOrigin>,
allowed_hosts: DomainsValidation<Host>,
handler: H,
extractor: T,
middleware: R,
threads: usize,
max_payload: usize,
keep_alive: bool
) -> Result<HttpServer> where
M: Metadata + Unpin,
S: Middleware<M>,
S::Future: Unpin,
S::CallFuture: Unpin,
H: Into<MetaIoHandler<M, S>>,
T: MetaExtractor<M>,
R: RequestMiddleware,
Expand description
Same as start_http
, but takes an additional middleware
parameter that is introduced as a
hyper middleware.