pub struct HttpPool { /* private fields */ }Expand description
A shared HTTP connection pool backed by a single reqwest::Client.
Create one of these at startup and pass the inner client to each driver so they all share the same connection pool and timeout settings.
Implementations§
Source§impl HttpPool
impl HttpPool
Sourcepub fn new(config: HttpPoolConfig) -> Self
pub fn new(config: HttpPoolConfig) -> Self
Build a new pool from the given configuration.
Sourcepub fn client(&self) -> &Client
pub fn client(&self) -> &Client
Return a reference to the shared reqwest::Client.
Sourcepub fn config(&self) -> &HttpPoolConfig
pub fn config(&self) -> &HttpPoolConfig
Return a reference to the pool configuration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpPool
impl !RefUnwindSafe for HttpPool
impl Send for HttpPool
impl Sync for HttpPool
impl Unpin for HttpPool
impl UnsafeUnpin for HttpPool
impl !UnwindSafe for HttpPool
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