pub struct PoolConfig<C, A, X, Q, E, M> { /* private fields */ }Expand description
A fully configured pool but you might override some defaults
Implementations§
Source§impl<C, A, X, Q, E, M> PoolConfig<C, A, X, Q, E, M>
impl<C, A, X, Q, E, M> PoolConfig<C, A, X, Q, E, M>
Sourcepub fn spawn_on(
self,
h: &Handle,
) -> <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Poolwhere
A: Stream<Item = Address, Error = Void>,
C: Connect + 'static,
<<C as Connect>::Future as Future>::Item: Sink,
M: NewMetrics,
M::Collect: 'static,
X: NewMux<A, C, E::ErrorLog, M::Collect>,
<X as NewMux<A, C, E::ErrorLog, M::Collect>>::Sink: 'static,
E: NewErrorLog<<<C as Connect>::Future as Future>::Error, <<<C as Connect>::Future as Future>::Item as Sink>::SinkError>,
E::ErrorLog: Clone + 'static,
Q: NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect, Pool = <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Pool>,
pub fn spawn_on(
self,
h: &Handle,
) -> <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Poolwhere
A: Stream<Item = Address, Error = Void>,
C: Connect + 'static,
<<C as Connect>::Future as Future>::Item: Sink,
M: NewMetrics,
M::Collect: 'static,
X: NewMux<A, C, E::ErrorLog, M::Collect>,
<X as NewMux<A, C, E::ErrorLog, M::Collect>>::Sink: 'static,
E: NewErrorLog<<<C as Connect>::Future as Future>::Error, <<<C as Connect>::Future as Future>::Item as Sink>::SinkError>,
E::ErrorLog: Clone + 'static,
Q: NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect, Pool = <Q as NewQueue<<<<C as Connect>::Future as Future>::Item as Sink>::SinkItem, <M as NewMetrics>::Collect>>::Pool>,
Spawn a connection pool on the main loop specified by handle
Sourcepub fn lazy_uniform_connections(
self,
num: u32,
) -> PoolConfig<C, A, LazyUniform, Q, E, M>
pub fn lazy_uniform_connections( self, num: u32, ) -> PoolConfig<C, A, LazyUniform, Q, E, M>
Configure a uniform connection pool with specified number of per-host connections crated lazily (i.e. when there are requests)
Sourcepub fn with_queue_size(self, num: usize) -> PoolConfig<C, A, X, Queue, E, M>
pub fn with_queue_size(self, num: usize) -> PoolConfig<C, A, X, Queue, E, M>
Add a queue of size num used when no connection can accept a message
Sourcepub fn metrics<NM>(self, metrics: NM) -> PoolConfig<C, A, X, Q, E, NM>where
NM: NewMetrics,
pub fn metrics<NM>(self, metrics: NM) -> PoolConfig<C, A, X, Q, E, NM>where
NM: NewMetrics,
Override metrics reporter
Sourcepub fn errors<NE>(self, errors: NE) -> PoolConfig<C, A, X, Q, NE, M>where
NE: ErrorLog,
pub fn errors<NE>(self, errors: NE) -> PoolConfig<C, A, X, Q, NE, M>where
NE: ErrorLog,
Override error reporter
Auto Trait Implementations§
impl<C, A, X, Q, E, M> Freeze for PoolConfig<C, A, X, Q, E, M>
impl<C, A, X, Q, E, M> RefUnwindSafe for PoolConfig<C, A, X, Q, E, M>where
C: RefUnwindSafe,
A: RefUnwindSafe,
X: RefUnwindSafe,
Q: RefUnwindSafe,
E: RefUnwindSafe,
M: RefUnwindSafe,
impl<C, A, X, Q, E, M> Send for PoolConfig<C, A, X, Q, E, M>
impl<C, A, X, Q, E, M> Sync for PoolConfig<C, A, X, Q, E, M>
impl<C, A, X, Q, E, M> Unpin for PoolConfig<C, A, X, Q, E, M>
impl<C, A, X, Q, E, M> UnwindSafe for PoolConfig<C, A, X, Q, E, M>
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