Skip to content

Commit b10f964

Browse files
committed
Add documentation for crate features
This closes sfackler#544
1 parent 7bc025d commit b10f964

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

postgres/src/lib.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@
4646
//! as an argument. The `NoTls` type in this crate can be used when TLS is not required. Otherwise, the
4747
//! `postgres-openssl` and `postgres-native-tls` crates provide implementations backed by the `openssl` and `native-tls`
4848
//! crates, respectively.
49+
//!
50+
//! # Features
51+
//!
52+
//! The following features can be enabled from `Cargo.toml`:
53+
//!
54+
//! | Feature | Description | Extra dependencies | Default |
55+
//! | ------- | ----------- | ------------------ | ------- |
56+
//! | `with-bit-vec-0_6` | Enable support for the `bit-vec` crate. | [bit-vec](https://crates.io/crates/bit-vec) 0.6 | no |
57+
//! | `with-chrono-0_4` | Enable support for the `chrono` crate. | [chrono](https://crates.io/crates/chrono) 0.4 | no |
58+
//! | `with-eui48-0_4` | Enable support for the `eui48` crate. | [eui48](https://crates.io/crates/eui48) 0.4 | no |
59+
//! | `with-geo-types-0_4` | Enable support for the `geo-types` crate. | [geo-types](https://crates.io/crates/geo-types) 0.4 | no |
60+
//! | `with-serde_json-1` | Enable support for the `serde_json` crate. | [eui48](https://crates.io/crates/serde_json) 1.0 | no |
61+
//! | `with-uuid-0_8` | Enable support for the `uuid` crate. | [uuid](https://crates.io/crates/uuid) 0.8 | no |
62+
//! | `with-time-0_2` | Enable support for the `time` crate. | [time](https://crates.io/crates/time) 0.2 | no |
4963
#![doc(html_root_url = "https://docs.rs/postgres/0.17")]
5064
#![warn(clippy::all, rust_2018_idioms, missing_docs)]
5165

tokio-postgres/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@
9696
//! as an argument. The `NoTls` type in this crate can be used when TLS is not required. Otherwise, the
9797
//! `postgres-openssl` and `postgres-native-tls` crates provide implementations backed by the `openssl` and `native-tls`
9898
//! crates, respectively.
99+
//!
100+
//! # Features
101+
//!
102+
//! The following features can be enabled from `Cargo.toml`:
103+
//!
104+
//! | Feature | Description | Extra dependencies | Default |
105+
//! | ------- | ----------- | ------------------ | ------- |
106+
//! | `runtime` | Enable convenience API for the connection process based on the `tokio` crate. | [tokio](https://crates.io/crates/tokio) 0.2 with the features `dns`, `net` and `time` | yes |
107+
//! | `with-bit-vec-0_6` | Enable support for the `bit-vec` crate. | [bit-vec](https://crates.io/crates/bit-vec) 0.6 | no |
108+
//! | `with-chrono-0_4` | Enable support for the `chrono` crate. | [chrono](https://crates.io/crates/chrono) 0.4 | no |
109+
//! | `with-eui48-0_4` | Enable support for the `eui48` crate. | [eui48](https://crates.io/crates/eui48) 0.4 | no |
110+
//! | `with-geo-types-0_4` | Enable support for the `geo-types` crate. | [geo-types](https://crates.io/crates/geo-types) 0.4 | no |
111+
//! | `with-serde_json-1` | Enable support for the `serde_json` crate. | [eui48](https://crates.io/crates/serde_json) 1.0 | no |
112+
//! | `with-uuid-0_8` | Enable support for the `uuid` crate. | [uuid](https://crates.io/crates/uuid) 0.8 | no |
113+
//! | `with-time-0_2` | Enable support for the `time` crate. | [time](https://crates.io/crates/time) 0.2 | no |
99114
#![doc(html_root_url = "https://docs.rs/tokio-postgres/0.5")]
100115
#![warn(rust_2018_idioms, clippy::all, missing_docs)]
101116

0 commit comments

Comments
 (0)