Struct mongo_driver::client::ClientPool [] [src]

pub struct ClientPool { /* fields omitted */ }

Pool that allows usage of clients out of a single pool from multiple threads.

Use the pool to pop a client and do operations. The client will be automatically added back to the pool when it goes out of scope.

This client pool cannot be cloned, but it can be use from different threads by using an Arc. Clients cannot be shared between threads, pop a client from the pool for very single thread where you need a connection.

Methods

impl ClientPool
[src]

[src]

Create a new ClientPool with that can provide clients pointing to the specified uri. The pool will connect via SSL if you add ?ssl=true to the uri. You can optionally pass in SSL options to configure SSL certificate usage and so on.

[src]

Get a reference to this pool's Uri.

[src]

Retrieve a client from the client pool, possibly blocking until one is available.

Trait Implementations

impl Send for ClientPool
[src]

impl Sync for ClientPool
[src]

impl Debug for ClientPool
[src]

[src]

Formats the value using the given formatter. Read more

impl Drop for ClientPool
[src]

[src]

Executes the destructor for this type. Read more