pub struct PoolBuilder<D: Deliverable> { /* private fields */ }Implementations§
Source§impl<D: Deliverable> PoolBuilder<D>
impl<D: Deliverable> PoolBuilder<D>
pub fn build(self) -> Result<Pool<D>, SpawnError>
Sourcepub fn build_with_adaptor<A>(self) -> Result<Pool<D>, SpawnError>
pub fn build_with_adaptor<A>(self) -> Result<Pool<D>, SpawnError>
Create the pool with a ConnectorAdaptor, a type that is used to wrap the hyper::Client’s connector
Sourcepub fn build_with_adaptor_and_resolver<A, CR>(
self,
) -> Result<Pool<D>, SpawnError>where
A: ConnectorAdaptor<CR::Resolver>,
A::Connect: 'static + Clone + Send + Sync,
CR: CreateResolver,
CR::Resolver: 'static + Clone + Send + Sync + Service<Name>,
CR::Error: 'static + Send + Sync + Error,
CR::Future: Send + Future<Output = Result<CR::Response, CR::Error>>,
CR::Response: Iterator<Item = SocketAddr>,
pub fn build_with_adaptor_and_resolver<A, CR>(
self,
) -> Result<Pool<D>, SpawnError>where
A: ConnectorAdaptor<CR::Resolver>,
A::Connect: 'static + Clone + Send + Sync,
CR: CreateResolver,
CR::Resolver: 'static + Clone + Send + Sync + Service<Name>,
CR::Error: 'static + Send + Sync + Error,
CR::Future: Send + Future<Output = Result<CR::Response, CR::Error>>,
CR::Response: Iterator<Item = SocketAddr>,
Create the pool with a ConnectorAdaptor, a type that is used to wrap the hyper::Client’s connector
Sourcepub fn transaction_counters(
self,
value: Arc<RwLock<Vec<TransactionCounter>>>,
) -> Self
pub fn transaction_counters( self, value: Arc<RwLock<Vec<TransactionCounter>>>, ) -> Self
Pass in an synchronized Vec<Weak
You can check that the WeakCounter is still valid by ensuring that the Arc::strong_count on the Weak reference
Auto Trait Implementations§
impl<D> Freeze for PoolBuilder<D>
impl<D> RefUnwindSafe for PoolBuilder<D>where
D: RefUnwindSafe,
impl<D> Send for PoolBuilder<D>
impl<D> Sync for PoolBuilder<D>where
D: Sync,
impl<D> Unpin for PoolBuilder<D>where
D: Unpin,
impl<D> UnwindSafe for PoolBuilder<D>where
D: UnwindSafe,
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