Struct servio_hyper::Servio2Hyper
source · pub struct Servio2Hyper<T> { /* private fields */ }
Expand description
Servio to hyper
service wrapper. It can be used to transform Servio-compatible service into
hyper
-compatible one.
Implementations§
source§impl<T> Servio2Hyper<T>
impl<T> Servio2Hyper<T>
pub fn new(
service: T,
server: Option<SocketAddr>,
client: Option<SocketAddr>
) -> Self
Trait Implementations§
source§impl<T, E, F, AS> Service<Request<Incoming>> for Servio2Hyper<T>where
E: StdError,
AS: Stream<Item = Event> + Send + Unpin + 'static,
F: Future<Output = Result<AS, E>> + Send + 'static,
T: Service<BodyServerStream, Error = E, Future = F>,
impl<T, E, F, AS> Service<Request<Incoming>> for Servio2Hyper<T>where
E: StdError,
AS: Stream<Item = Event> + Send + Unpin + 'static,
F: Future<Output = Result<AS, E>> + Send + 'static,
T: Service<BodyServerStream, Error = E, Future = F>,
§type Response = Response<Pin<Box<dyn Body<Data = Bytes, Error = Box<dyn Error + Sync + Send + 'static, Global>> + Send + 'static, Global>>>
type Response = Response<Pin<Box<dyn Body<Data = Bytes, Error = Box<dyn Error + Sync + Send + 'static, Global>> + Send + 'static, Global>>>
Responses given by the service.
§type Error = <T as Service<BodyServerStream>>::Error
type Error = <T as Service<BodyServerStream>>::Error
Errors produced by the service.