pub struct SharedCfg(/* private fields */);Expand description
An immutable collection of typed configuration values.
Implementations§
Sourcepub fn new(tag: &'static str) -> SharedCfgBuilder
pub fn new(tag: &'static str) -> SharedCfgBuilder
Starts building a shared configuration with the given tag.
Sourcepub fn get<T>(&self) -> Cfg<T>where
T: Configuration,
pub fn get<T>(&self) -> Cfg<T>where
T: Configuration,
Returns the configuration value of type T.
§Panics
Panics if the shared configuration is still being built.
Trait Implementations§
Source§fn from(cfg: SharedCfgBuilder) -> SharedCfg
fn from(cfg: SharedCfgBuilder) -> SharedCfg
Converts to this type from the input type.
§async fn call(
&self,
req: A,
ctx: Ctx<'_, Connector<A, S>, SharedCfg>,
) -> Result<<Connector<A, S> as Service<SharedCfg, A>>::Res, <Connector<A, S> as Service<SharedCfg, A>>::Error>
async fn call( &self, req: A, ctx: Ctx<'_, Connector<A, S>, SharedCfg>, ) -> Result<<Connector<A, S> as Service<SharedCfg, A>>::Res, <Connector<A, S> as Service<SharedCfg, A>>::Error>
Connects to an HTTP/2 server.
§async fn ready(
&self,
ctx: Ctx<'_, Connector<A, S>, SharedCfg>,
) -> Result<(), <Connector<A, S> as Service<SharedCfg, A>>::Error>
async fn ready( &self, ctx: Ctx<'_, Connector<A, S>, SharedCfg>, ) -> Result<(), <Connector<A, S> as Service<SharedCfg, A>>::Error>
Waits until the service is ready to process a request. Read more
§async fn shutdown(&self, ctx: Ctx<'_, Connector<A, S>, SharedCfg>)
async fn shutdown(&self, ctx: Ctx<'_, Connector<A, S>, SharedCfg>)
Shuts down the service. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Error produced while checking readiness or processing a request.
Source§async fn call(
&self,
req: Connect<A>,
ctx: Ctx<'_, Connector<A>, SharedCfg>,
) -> Result<Io, <Connector<A> as Service<SharedCfg, Connect<A>>>::Error>
async fn call( &self, req: Connect<A>, ctx: Ctx<'_, Connector<A>, SharedCfg>, ) -> Result<Io, <Connector<A> as Service<SharedCfg, Connect<A>>>::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
Waits until the service is ready to process a request. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Error produced while checking readiness or processing a request.
Source§async fn call(
&self,
req: Connect<A>,
ctx: Ctx<'_, SslConnector<S>, SharedCfg>,
) -> Result<<SslConnector<S> as Service<SharedCfg, Connect<A>>>::Res, <SslConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
async fn call( &self, req: Connect<A>, ctx: Ctx<'_, SslConnector<S>, SharedCfg>, ) -> Result<<SslConnector<S> as Service<SharedCfg, Connect<A>>>::Res, <SslConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(
&self,
ctx: Ctx<'_, SslConnector<S>, SharedCfg>,
) -> Result<(), <SslConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
async fn ready( &self, ctx: Ctx<'_, SslConnector<S>, SharedCfg>, ) -> Result<(), <SslConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
Waits until the service is ready to process a request. Read more
Source§async fn shutdown(&self, ctx: Ctx<'_, SslConnector<S>, SharedCfg>)
async fn shutdown(&self, ctx: Ctx<'_, SslConnector<S>, SharedCfg>)
Shuts down the service. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Error produced while checking readiness or processing a request.
Source§async fn call(
&self,
req: Connect<A>,
ctx: Ctx<'_, TlsConnector<S>, SharedCfg>,
) -> Result<<TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Res, <TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
async fn call( &self, req: Connect<A>, ctx: Ctx<'_, TlsConnector<S>, SharedCfg>, ) -> Result<<TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Res, <TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(
&self,
ctx: Ctx<'_, TlsConnector<S>, SharedCfg>,
) -> Result<(), <TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
async fn ready( &self, ctx: Ctx<'_, TlsConnector<S>, SharedCfg>, ) -> Result<(), <TlsConnector<S> as Service<SharedCfg, Connect<A>>>::Error>
Waits until the service is ready to process a request. Read more
Source§async fn shutdown(&self, ctx: Ctx<'_, TlsConnector<S>, SharedCfg>)
async fn shutdown(&self, ctx: Ctx<'_, TlsConnector<S>, SharedCfg>)
Shuts down the service. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.