Struct ntex_h2::server::ServerHandler
source · pub struct ServerHandler<Ctl, Pub>(_);Expand description
Http2 connections handler
Implementations§
source§impl<Ctl, Pub> ServerHandler<Ctl, Pub>where
Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Pub: ServiceFactory<Message, Response = ()> + 'static,
Pub::Error: Debug,
Pub::InitError: Debug,
impl<Ctl, Pub> ServerHandler<Ctl, Pub>where Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static, Ctl::Error: Debug, Ctl::InitError: Debug, Pub: ServiceFactory<Message, Response = ()> + 'static, Pub::Error: Debug, Pub::InitError: Debug,
Trait Implementations§
source§impl<Ctl, Pub> Clone for ServerHandler<Ctl, Pub>
impl<Ctl, Pub> Clone for ServerHandler<Ctl, Pub>
source§impl<F, Ctl, Pub> Service<Io<F>> for ServerHandler<Ctl, Pub>where
F: Filter,
Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Pub: ServiceFactory<Message, Response = ()> + 'static,
Pub::Error: Debug,
Pub::InitError: Debug,
impl<F, Ctl, Pub> Service<Io<F>> for ServerHandler<Ctl, Pub>where F: Filter, Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static, Ctl::Error: Debug, Ctl::InitError: Debug, Pub: ServiceFactory<Message, Response = ()> + 'static, Pub::Error: Debug, Pub::InitError: Debug,
§type Error = ServerError<()>
type Error = ServerError<()>
Errors produced by the service when polling readiness or executing call.
§type Future<'f> = Pin<Box<dyn Future<Output = Result<<ServerHandler<Ctl, Pub> as Service<Io<F>>>::Response, <ServerHandler<Ctl, Pub> as Service<Io<F>>>::Error>> + 'f, Global>>
type Future<'f> = Pin<Box<dyn Future<Output = Result<<ServerHandler<Ctl, Pub> as Service<Io<F>>>::Response, <ServerHandler<Ctl, Pub> as Service<Io<F>>>::Error>> + 'f, Global>>
The future response value.
source§fn call<'a>(&'a self, req: Io<F>, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, req: Io<F>, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where
Self: Sized,
F: Fn(Self::Response) -> Res,
fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where Self: Sized, F: Fn(Self::Response) -> Res,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where Self: Sized, F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service. Read more
source§fn chain(self) -> ServiceChain<Self, Req>where
Self: Sized,
fn chain(self) -> ServiceChain<Self, Req>where Self: Sized,
Convert
Self to a ServiceChainsource§impl<Ctl, Pub> Service<IoBoxed> for ServerHandler<Ctl, Pub>where
Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static,
Ctl::Error: Debug,
Ctl::InitError: Debug,
Pub: ServiceFactory<Message, Response = ()> + 'static,
Pub::Error: Debug,
Pub::InitError: Debug,
impl<Ctl, Pub> Service<IoBoxed> for ServerHandler<Ctl, Pub>where Ctl: ServiceFactory<ControlMessage<Pub::Error>, Response = ControlResult> + 'static, Ctl::Error: Debug, Ctl::InitError: Debug, Pub: ServiceFactory<Message, Response = ()> + 'static, Pub::Error: Debug, Pub::InitError: Debug,
§type Error = ServerError<()>
type Error = ServerError<()>
Errors produced by the service when polling readiness or executing call.
§type Future<'f> = Pin<Box<dyn Future<Output = Result<<ServerHandler<Ctl, Pub> as Service<IoBoxed>>::Response, <ServerHandler<Ctl, Pub> as Service<IoBoxed>>::Error>> + 'f, Global>>
type Future<'f> = Pin<Box<dyn Future<Output = Result<<ServerHandler<Ctl, Pub> as Service<IoBoxed>>::Response, <ServerHandler<Ctl, Pub> as Service<IoBoxed>>::Error>> + 'f, Global>>
The future response value.
source§fn call<'a>(&'a self, io: IoBoxed, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
fn call<'a>(&'a self, io: IoBoxed, _: ServiceCtx<'a, Self>) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where
Self: Sized,
F: Fn(Self::Response) -> Res,
fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where Self: Sized, F: Fn(Self::Response) -> Res,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where Self: Sized, F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service. Read more
source§fn chain(self) -> ServiceChain<Self, Req>where
Self: Sized,
fn chain(self) -> ServiceChain<Self, Req>where Self: Sized,
Convert
Self to a ServiceChainAuto Trait Implementations§
impl<Ctl, Pub> !RefUnwindSafe for ServerHandler<Ctl, Pub>
impl<Ctl, Pub> !Send for ServerHandler<Ctl, Pub>
impl<Ctl, Pub> !Sync for ServerHandler<Ctl, Pub>
impl<Ctl, Pub> Unpin for ServerHandler<Ctl, Pub>
impl<Ctl, Pub> !UnwindSafe for ServerHandler<Ctl, Pub>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Servicesource§fn into_chain(self) -> ServiceChain<Svc, Req>where
Self: Sized,
fn into_chain(self) -> ServiceChain<Svc, Req>where Self: Sized,
Convert
Self to a ServiceChain