pub struct SharedCfg(/* private fields */);Expand description
Shared configuration
Implementations§
Sourcepub fn new(tag: &'static str) -> SharedCfgBuilder
pub fn new(tag: &'static str) -> SharedCfgBuilder
Construct new configuration
Sourcepub fn get<T>(&self) -> Cfg<T>where
T: Configuration,
pub fn get<T>(&self) -> Cfg<T>where
T: Configuration,
Get a reference to a previously inserted on configuration.
§Panics
if shared config is in building stage
Trait Implementations§
Source§fn from(cfg: SharedCfgBuilder) -> SharedCfg
fn from(cfg: SharedCfgBuilder) -> SharedCfg
Converts to this type from the input type.
Source§fn create(&self, service: S, _: SharedCfg) -> Self::Service
fn create(&self, service: S, _: SharedCfg) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Source§type Service = DefaultHeadersMiddleware<S>
type Service = DefaultHeadersMiddleware<S>
The middleware
Service value created by this factorySource§fn create(&self, service: S, _: SharedCfg) -> Self::Service
fn create(&self, service: S, _: SharedCfg) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Source§fn create(&self, service: S, _: SharedCfg) -> Self::Service
fn create(&self, service: S, _: SharedCfg) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Source§type Service = WebMiddleware<<Outer as Middleware<<Inner as Middleware<S, SharedCfg>>::Service, SharedCfg>>::Service, Err>
type Service = WebMiddleware<<Outer as Middleware<<Inner as Middleware<S, SharedCfg>>::Service, SharedCfg>>::Service, Err>
The middleware
Service value created by this factorySource§fn create(&self, service: S, cfg: SharedCfg) -> Self::Service
fn create(&self, service: S, cfg: SharedCfg) -> Self::Service
Creates and returns a new middleware service.
Source§fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
fn apply<Fac, Req>(
self,
factory: Fac,
) -> ServiceChainFactory<ApplyMiddleware<Self, Fac, Cfg>, Req, Cfg>where
Fac: ServiceFactory<Req, Cfg, Service = Svc>,
Cfg: Clone,
Self: Sized,
Self::Service: Service<Req>,
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Source§type Response = SimpleClient
type Response = SimpleClient
Responses given by the created services.
Source§type Error = Error<ClientError>
type Error = Error<ClientError>
Errors produced by the created services.
Source§type InitError = <T as ServiceFactory<Connect<A>, SharedCfg>>::InitError
type InitError = <T as ServiceFactory<Connect<A>, SharedCfg>>::InitError
Possible errors encountered during service construction.
Source§type Service = ConnectorService<A, <T as ServiceFactory<Connect<A>, SharedCfg>>::Service>
type Service = ConnectorService<A, <T as ServiceFactory<Connect<A>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<Connector<A, T> as ServiceFactory<A, SharedCfg>>::Service, <Connector<A, T> as ServiceFactory<A, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<Connector<A, T> as ServiceFactory<A, SharedCfg>>::Service, <Connector<A, T> as ServiceFactory<A, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ConnectError
type Error = ConnectError
Errors produced by the created services.
Source§type Service = SslConnectorService<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
type Service = SslConnectorService<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<SslConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <SslConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<SslConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <SslConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Errors produced by the created services.
Source§type Service = SslConnectorService2<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
type Service = SslConnectorService2<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<SslConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <SslConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<SslConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <SslConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ConnectError
type Error = ConnectError
Errors produced by the created services.
Source§type Service = TlsConnectorService<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
type Service = TlsConnectorService<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<TlsConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <TlsConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<TlsConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <TlsConnector<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Errors produced by the created services.
Source§type Service = TlsConnectorService2<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
type Service = TlsConnectorService2<<S as ServiceFactory<Connect<A>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
type InitError = <S as ServiceFactory<Connect<A>, SharedCfg>>::InitError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<TlsConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <TlsConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<TlsConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::Service, <TlsConnector2<S> as ServiceFactory<Connect<A>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ConnectError
type Error = ConnectError
Errors produced by the created services.
Source§type Service = ConnectorService<T>
type Service = ConnectorService<T>
The type of
Service produced by this factory.Source§type InitError = ConnectServiceError
type InitError = ConnectServiceError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<Connector<T> as ServiceFactory<Connect<T>, SharedCfg>>::Service, <Connector<T> as ServiceFactory<Connect<T>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<Connector<T> as ServiceFactory<Connect<T>, SharedCfg>>::Service, <Connector<T> as ServiceFactory<Connect<T>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Errors produced by the created services.
Source§type Service = ConnectorService2<T>
type Service = ConnectorService2<T>
The type of
Service produced by this factory.Source§type InitError = ConnectServiceError
type InitError = ConnectServiceError
Possible errors encountered during service construction.
Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<Connector2<T> as ServiceFactory<Connect<T>, SharedCfg>>::Service, <Connector2<T> as ServiceFactory<Connect<T>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<Connector2<T> as ServiceFactory<Connect<T>, SharedCfg>>::Service, <Connector2<T> as ServiceFactory<Connect<T>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ConnectError
type Error = ConnectError
Errors produced by the created services.
Source§type Service = ConnectorService
type Service = ConnectorService
The type of
Service produced by this factory.Source§async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Response = ControlAck<F>
type Response = ControlAck<F>
Responses given by the created services.
Source§type Service = DefaultControlService
type Service = DefaultControlService
The type of
Service produced by this factory.Source§async fn create(&self, _: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, _: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Response = ControlAck
type Response = ControlAck
Responses given by the created services.
Source§type Service = DefaultControlService
type Service = DefaultControlService
The type of
Service produced by this factory.Source§async fn create(&self, _: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, _: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
Source§type Service = H1ServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, <C as ServiceFactory<Control<F, <S as ServiceFactory<Request, SharedCfg>>::Error>, SharedCfg>>::Service>
type Service = H1ServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, <C as ServiceFactory<Control<F, <S as ServiceFactory<Request, SharedCfg>>::Error>, SharedCfg>>::Service>
The type of
Service produced by this factory.Source§async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
Source§type Service = H2ServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, C>
type Service = H2ServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, C>
The type of
Service produced by this factory.Source§async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = DispatchError
type Error = DispatchError
Errors produced by the created services.
Source§type Service = HttpServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, <C1 as ServiceFactory<Control<F, <S as ServiceFactory<Request, SharedCfg>>::Error>, SharedCfg>>::Service, C2>
type Service = HttpServiceHandler<F, <S as ServiceFactory<Request, SharedCfg>>::Service, B, <C1 as ServiceFactory<Control<F, <S as ServiceFactory<Request, SharedCfg>>::Error>, SharedCfg>>::Service, C2>
The type of
Service produced by this factory.Source§async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ServerError<()>
type Error = ServerError<()>
Errors produced by the created services.
Source§type Service = ServerHandler<Pub, Ctl>
type Service = ServerHandler<Pub, Ctl>
The type of
Service produced by this factory.Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<Server<Pub, Ctl> as ServiceFactory<Io<F>, SharedCfg>>::Service, <Server<Pub, Ctl> as ServiceFactory<Io<F>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<Server<Pub, Ctl> as ServiceFactory<Io<F>, SharedCfg>>::Service, <Server<Pub, Ctl> as ServiceFactory<Io<F>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Service = SslAcceptorService
type Service = SslAcceptorService
The type of
Service produced by this factory.Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<SslAcceptor as ServiceFactory<Io<F>, SharedCfg>>::Service, <SslAcceptor as ServiceFactory<Io<F>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<SslAcceptor as ServiceFactory<Io<F>, SharedCfg>>::Service, <SslAcceptor as ServiceFactory<Io<F>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Service = TlsAcceptorService
type Service = TlsAcceptorService
The type of
Service produced by this factory.Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<TlsAcceptor as ServiceFactory<Io<F>, SharedCfg>>::Service, <TlsAcceptor as ServiceFactory<Io<F>, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<TlsAcceptor as ServiceFactory<Io<F>, SharedCfg>>::Service, <TlsAcceptor as ServiceFactory<Io<F>, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Error = ServerError<()>
type Error = ServerError<()>
Errors produced by the created services.
Source§type Service = ServerHandler<Pub, Ctl>
type Service = ServerHandler<Pub, Ctl>
The type of
Service produced by this factory.Source§async fn create(
&self,
cfg: SharedCfg,
) -> Result<<Server<Pub, Ctl> as ServiceFactory<IoBoxed, SharedCfg>>::Service, <Server<Pub, Ctl> as ServiceFactory<IoBoxed, SharedCfg>>::InitError>
async fn create( &self, cfg: SharedCfg, ) -> Result<<Server<Pub, Ctl> as ServiceFactory<IoBoxed, SharedCfg>>::Service, <Server<Pub, Ctl> as ServiceFactory<IoBoxed, SharedCfg>>::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Source§type Response = WebResponse
type Response = WebResponse
Responses given by the created services.
Source§type Error = <Err as ErrorRenderer>::Container
type Error = <Err as ErrorRenderer>::Container
Errors produced by the created services.
Source§async fn create(&self, _: SharedCfg) -> Result<RouteService<Err>, ()>
async fn create(&self, _: SharedCfg) -> Result<RouteService<Err>, ()>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Auto Trait Implementations§
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