From bac4b8d0bb6759a69420e125c751e751a7e117da Mon Sep 17 00:00:00 2001 From: Anatoly Ikorsky Date: Wed, 16 Nov 2022 18:20:25 +0300 Subject: [PATCH] Update docs --- README.md | 15 ++++++++++----- src/lib.rs | 15 ++++++++++----- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 83904d3..23c98f4 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,13 @@ fn main() -> std::result::Result<(), Box> { ### 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 @@ -130,16 +137,14 @@ fn main() -> std::result::Result<(), Box> { * **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"]} ``` diff --git a/src/lib.rs b/src/lib.rs index 95feaa2..18f511f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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 @@ -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"]} //! ``` //!