1use actix_codec::Framed;
2use actix_service::{Service, ServiceFactory};
3use futures_core::future::LocalBoxFuture;
4
5use crate::{h1::Codec, Error, Request};
6
7pub struct UpgradeHandler;
8
9impl<T> ServiceFactory<(Request, Framed<T, Codec>)> for UpgradeHandler {
10 type Response = ();
11 type Error = Error;
12 type Config = ();
13 type Service = UpgradeHandler;
14 type InitError = Error;
15 type Future = LocalBoxFuture<'static, Result<Self::Service, Self::InitError>>;
16
17 fn new_service(&self, _: ()) -> Self::Future {
18 unimplemented!()
19 }
20}
21
22impl<T> Service<(Request, Framed<T, Codec>)> for UpgradeHandler {
23 type Response = ();
24 type Error = Error;
25 type Future = LocalBoxFuture<'static, Result<Self::Response, Self::Error>>;
26
27 actix_service::always_ready!();
28
29 fn call(&self, _: (Request, Framed<T, Codec>)) -> Self::Future {
30 unimplemented!()
31 }
32}