pub struct S7Pool { /* private fields */ }Expand description
A bounded pool of S7Client<TcpTransport> connections.
Implementations§
Source§impl S7Pool
impl S7Pool
Sourcepub fn new(
addr: SocketAddr,
connect_params: ConnectParams,
cfg: PoolConfig,
) -> Self
pub fn new( addr: SocketAddr, connect_params: ConnectParams, cfg: PoolConfig, ) -> Self
Create a new pool targeting addr with connect_params and cfg.
Sourcepub async fn acquire(&self) -> Result<PooledClient, Error>
pub async fn acquire(&self) -> Result<PooledClient, Error>
Borrow a connection from the pool, opening a new one if none are idle.
Blocks until a semaphore permit is available (bounded by max_size).
Auto Trait Implementations§
impl Freeze for S7Pool
impl RefUnwindSafe for S7Pool
impl Send for S7Pool
impl Sync for S7Pool
impl Unpin for S7Pool
impl UnsafeUnpin for S7Pool
impl UnwindSafe for S7Pool
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