Struct PooledConnector
pub struct PooledConnector<S, P, R> { /* private fields */ }
Implementations§
§impl<S, P, R> PooledConnector<S, P, R>
impl<S, P, R> PooledConnector<S, P, R>
pub fn new(inner: S, pool: P, req_to_conn_id: R) -> PooledConnector<S, P, R>
pub fn maybe_with_wait_for_pool_timeout(
self,
timeout: Option<Duration>,
) -> PooledConnector<S, P, R>
pub fn maybe_with_wait_for_pool_timeout( self, timeout: Option<Duration>, ) -> PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
pub fn maybe_set_wait_for_pool_timeout(
&mut self,
timeout: Option<Duration>,
) -> &mut PooledConnector<S, P, R>
pub fn maybe_set_wait_for_pool_timeout( &mut self, timeout: Option<Duration>, ) -> &mut PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
pub fn with_wait_for_pool_timeout(
self,
timeout: Duration,
) -> PooledConnector<S, P, R>
pub fn with_wait_for_pool_timeout( self, timeout: Duration, ) -> PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
pub fn set_wait_for_pool_timeout(
&mut self,
timeout: Duration,
) -> &mut PooledConnector<S, P, R>
pub fn set_wait_for_pool_timeout( &mut self, timeout: Duration, ) -> &mut PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
pub fn without_wait_for_pool_timeout(self) -> PooledConnector<S, P, R>
pub fn without_wait_for_pool_timeout(self) -> PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
pub fn unset_wait_for_pool_timeout(&mut self) -> &mut PooledConnector<S, P, R>
pub fn unset_wait_for_pool_timeout(&mut self) -> &mut PooledConnector<S, P, R>
Set timeout after which requesting a connection from the pool will timeout
If no timeout is specified there will be no limit, this could be dangerous depending on how many users are waiting for a connection
Trait Implementations§
§impl<Request, S, P, R> Service<Request> for PooledConnector<S, P, R>where
S: ConnectorService<Request>,
<S as ConnectorService<Request>>::Connection: Send,
<S as ConnectorService<Request>>::Error: Send + 'static,
Request: Send + 'static,
P: Pool<<S as ConnectorService<Request>>::Connection, <R as ReqToConnID<Request>>::ID>,
R: ReqToConnID<Request>,
impl<Request, S, P, R> Service<Request> for PooledConnector<S, P, R>where
S: ConnectorService<Request>,
<S as ConnectorService<Request>>::Connection: Send,
<S as ConnectorService<Request>>::Error: Send + 'static,
Request: Send + 'static,
P: Pool<<S as ConnectorService<Request>>::Connection, <R as ReqToConnID<Request>>::ID>,
R: ReqToConnID<Request>,
§type Response = EstablishedClientConnection<<P as Pool<<S as ConnectorService<Request>>::Connection, <R as ReqToConnID<Request>>::ID>>::Connection, Request>
type Response = EstablishedClientConnection<<P as Pool<<S as ConnectorService<Request>>::Connection, <R as ReqToConnID<Request>>::ID>>::Connection, Request>
§async fn serve(
&self,
ctx: Context,
req: Request,
) -> Result<<PooledConnector<S, P, R> as Service<Request>>::Response, <PooledConnector<S, P, R> as Service<Request>>::Error>
async fn serve( &self, ctx: Context, req: Request, ) -> Result<<PooledConnector<S, P, R> as Service<Request>>::Response, <PooledConnector<S, P, R> as Service<Request>>::Error>
§fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
fn boxed(self) -> BoxService<Request, Self::Response, Self::Error>
Auto Trait Implementations§
impl<S, P, R> Freeze for PooledConnector<S, P, R>
impl<S, P, R> RefUnwindSafe for PooledConnector<S, P, R>
impl<S, P, R> Send for PooledConnector<S, P, R>
impl<S, P, R> Sync for PooledConnector<S, P, R>
impl<S, P, R> Unpin for PooledConnector<S, P, R>
impl<S, P, R> UnwindSafe for PooledConnector<S, P, R>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<S, Request, Connection> ConnectorService<Request> for S
impl<S, Request, Connection> ConnectorService<Request> for S
§type Connection = Connection
type Connection = Connection
ConnectorService
§fn connect(
&self,
ctx: Context,
req: Request,
) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Request>>::Connection, Request>, <S as ConnectorService<Request>>::Error>> + Send
fn connect( &self, ctx: Context, req: Request, ) -> impl Future<Output = Result<EstablishedClientConnection<<S as ConnectorService<Request>>::Connection, Request>, <S as ConnectorService<Request>>::Error>> + Send
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more