Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Nov 16, 2022
1 parent 4cbf211 commit bac4b8d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {

### Crate Features

* feature sets:

* **default** – includes default `mysql_common` features, `native-tls`, `buffer-pool`
and `flate2/zlib`
* **default-rustls** - same as `default` but with `rustls-tls` instead of `native-tls`
* **minimal** - includes `flate2/zlib`

* crate's features:

* **native-tls** (enabled by default) – specifies `native-tls` as the TLS backend
Expand All @@ -130,16 +137,14 @@ fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
* **mysql_common/uuid** – the `uuid` is enabled by default
* **mysql_common/frunk** – the `frunk` is enabled by default

Please note, that you'll need to reenable external features if you are using `default-features = false`:
Please note, that you'll need to reenable required features if you are using `default-features = false`:

```toml
[dependencies]
# Lets say that we want to use the `rustls-tls` feature:
mysql = { version = "*", default-features = false, features = ["rustls-tls", "buffer-pool"] }
mysql = { version = "*", default-features = false, features = ["minimal", "rustls-tls"] }
# Previous line disables default mysql features,
# so now we have to choose the flate2 backend (this is necessary),
# as well as the desired set of mysql_common features:
flate2 = { version = "*", default-features = false, features = ["zlib"] }
# so now we need to choose desired mysql_common features:
mysql_common = { version = "*", default-features = false, features = ["bigdecimal03", "time03", "uuid"]}
```

Expand Down
15 changes: 10 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
//!
//! ## Crate Features
//!
//! * feature sets:
//!
//! * **default** – includes default `mysql_common` features, `native-tls`, `buffer-pool`
//! and `flate2/zlib`
//! * **default-rustls** - same as `default` but with `rustls-tls` instead of `native-tls`
//! * **minimal** - includes `flate2/zlib`
//!
//! * crate's features:
//!
//! * **native-tls** (enabled by default) – specifies `native-tls` as the TLS backend
Expand All @@ -132,16 +139,14 @@
//! * **mysql_common/uuid** – the `uuid` is enabled by default
//! * **mysql_common/frunk** – the `frunk` is enabled by default
//!
//! Please note, that you'll need to reenable external features if you are using `default-features = false`:
//! Please note, that you'll need to reenable required features if you are using `default-features = false`:
//!
//! ```toml
//! [dependencies]
//! # Lets say that we want to use the `rustls-tls` feature:
//! mysql = { version = "*", default-features = false, features = ["rustls-tls", "buffer-pool"] }
//! mysql = { version = "*", default-features = false, features = ["minimal", "rustls-tls"] }
//! # Previous line disables default mysql features,
//! # so now we have to choose the flate2 backend (this is necessary),
//! # as well as the desired set of mysql_common features:
//! flate2 = { version = "*", default-features = false, features = ["zlib"] }
//! # so now we need to choose desired mysql_common features:
//! mysql_common = { version = "*", default-features = false, features = ["bigdecimal03", "time03", "uuid"]}
//! ```
//!
Expand Down

0 comments on commit bac4b8d

Please sign in to comment.