Struct mongo_driver::client::Client [] [src]

pub struct Client<'a> { /* fields omitted */ }

Client that provides access to a MongoDB MongoDB node, replica-set, or sharded-cluster.

It maintains management of underlying sockets and routing to individual nodes based on ReadPrefs or WriteConcern. Clients cannot be shared between threads, pop a new one from a ClientPool in every thread that needs a connection instead.

Methods

impl<'a> Client<'a>
[src]

[src]

Borrow a collection

[src]

Take a collection, client is owned by the collection so the collection can easily be passed around

[src]

Borrow a database

[src]

Take a database, client is owned by the database so the database can easily be passed around

[src]

Queries the server for the current server status, returns a document with this information.

Trait Implementations

impl<'a> Drop for Client<'a>
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl<'a> !Send for Client<'a>

impl<'a> !Sync for Client<'a>