Skip to content

Commit

Permalink
release v2.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfreed committed Aug 6, 2021
1 parent 5d09bf4 commit 6bd7b39
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = "https://github.com/mongodb/mongo-rust-driver"
license = "Apache-2.0"
readme = "README.md"
name = "mongodb"
version = "2.0.0-beta.2"
version = "2.0.0-beta.3"

exclude = [
"etc/**",
Expand Down Expand Up @@ -38,7 +38,7 @@ bson-uuid-0_8 = ["bson/uuid-0_8"]
async-trait = "0.1.42"
base64 = "0.13.0"
bitflags = "1.1.0"
bson = { git = "https://github.com/mongodb/bson-rust" }
bson = "2.0.0-beta.3"
chrono = "0.4.7"
derivative = "2.1.1"
futures-core = "0.3.14"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MongoDB Rust Driver
[![Crates.io](https://img.shields.io/crates/v/mongodb.svg)](https://crates.io/crates/mongodb) [![docs.rs](https://docs.rs/mongodb/badge.svg)](https://docs.rs/mongodb) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)

This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It uses the [`bson`](https://docs.rs/bson/2.0.0-beta.2) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.
This repository contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It uses the [`bson`](https://docs.rs/bson/2.0.0-beta.3) crate for BSON support. The driver contains a fully async API that supports either [`tokio`](https://crates.io/crates/tokio) (default) or [`async-std`](https://crates.io/crates/async-std), depending on the feature flags set. The driver also has a sync API that may be enabled via feature flag.

## Index
- [Installation](#installation)
Expand Down Expand Up @@ -34,7 +34,7 @@ This repository contains the officially supported MongoDB Rust driver, a client
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`.
```toml
[dependencies]
mongodb = "2.0.0-beta.2"
mongodb = "2.0.0-beta.3"
```

#### Configuring the async runtime
Expand All @@ -43,7 +43,7 @@ The driver supports both of the most popular async runtime crates, namely [`toki
For example, to instruct the driver to work with [`async-std`](https://crates.io/crates/async-std), add the following to your `Cargo.toml`:
```toml
[dependencies.mongodb]
version = "2.0.0-beta.2"
version = "2.0.0-beta.3"
default-features = false
features = ["async-std-runtime"]
```
Expand All @@ -52,14 +52,14 @@ features = ["async-std-runtime"]
The driver also provides a blocking sync API. To enable this, add the `"sync"` feature to your `Cargo.toml`:
```toml
[dependencies.mongodb]
version = "2.0.0-beta.2"
version = "2.0.0-beta.3"
default-features = false
features = ["sync"]
```
**Note:** if the sync API is enabled, the async-specific types will be privatized (e.g. `mongodb::Client`). The sync-specific types can be imported from `mongodb::sync` (e.g. `mongodb::sync::Client`).

## Example Usage
Below are simple examples of using the driver. For more specific examples and the API reference, see the driver's [docs.rs page](https://docs.rs/mongodb/2.0.0-beta.2).
Below are simple examples of using the driver. For more specific examples and the API reference, see the driver's [docs.rs page](https://docs.rs/mongodb/2.0.0-beta.3).

### Using the async API
#### Connecting to a MongoDB deployment
Expand Down Expand Up @@ -109,7 +109,7 @@ let docs = vec![
collection.insert_many(docs, None).await?;
```

A [`Collection`](https://docs.rs/mongodb/2.0.0-beta.2/mongodb/struct.Collection.html) can be parameterized with any type that implements the `Serialize` and `Deserialize` traits from the [`serde`](https://serde.rs/) crate, not just `Document`:
A [`Collection`](https://docs.rs/mongodb/2.0.0-beta.3/mongodb/struct.Collection.html) can be parameterized with any type that implements the `Serialize` and `Deserialize` traits from the [`serde`](https://serde.rs/) crate, not just `Document`:

``` toml
# In Cargo.toml, add the following dependency.
Expand Down Expand Up @@ -146,7 +146,7 @@ typed_collection.insert_many(books, None).await?;
```

#### Finding documents in a collection
Results from queries are generally returned via [`Cursor`](https://docs.rs/mongodb/2.0.0-beta.2/mongodb/struct.Cursor.html), a struct which streams the results back from the server as requested. The [`Cursor`](https://docs.rs/mongodb/2.0.0-beta.2/mongodb/struct.Cursor.html) type implements the [`Stream`](https://docs.rs/futures/latest/futures/stream/index.html) trait from the [`futures`](https://crates.io/crates/futures) crate, and in order to access its streaming functionality you need to import at least one of the [`StreamExt`](https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html) or [`TryStreamExt`](https://docs.rs/futures/latest/futures/stream/trait.TryStreamExt.html) traits.
Results from queries are generally returned via [`Cursor`](https://docs.rs/mongodb/2.0.0-beta.3/mongodb/struct.Cursor.html), a struct which streams the results back from the server as requested. The [`Cursor`](https://docs.rs/mongodb/2.0.0-beta.3/mongodb/struct.Cursor.html) type implements the [`Stream`](https://docs.rs/futures/latest/futures/stream/index.html) trait from the [`futures`](https://crates.io/crates/futures) crate, and in order to access its streaming functionality you need to import at least one of the [`StreamExt`](https://docs.rs/futures/latest/futures/stream/trait.StreamExt.html) or [`TryStreamExt`](https://docs.rs/futures/latest/futures/stream/trait.TryStreamExt.html) traits.

``` toml
# In Cargo.toml, add the following dependency.
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(test, type_length_limit = "80000000")]
#![doc(html_root_url = "https://docs.rs/mongodb/2.0.0-beta.2")]
#![doc(html_root_url = "https://docs.rs/mongodb/2.0.0-beta.3")]

macro_rules! define_if_single_runtime_enabled {
( $( $def:item )+ ) => {
Expand Down

0 comments on commit 6bd7b39

Please sign in to comment.