Document ruma-client crate features

This commit is contained in:
Jonas Platte 2021-07-03 20:02:00 +02:00
parent 325806409b
commit c9c536ed0b
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 26 additions and 0 deletions

View File

@ -69,6 +69,25 @@
//! }
//! # ;
//! ```
//!
//! # Crate features
//!
//! The following features activate http client types in the [`http_client`] module:
//!
//! * `hyper`
//! * `hyper-native-tls`
//! * `hyper-rustls`
//! * `isahc`
//! * `reqwest` if you use the `reqwest` library already, activate this feature and configure the
//! TLS backend on `reqwest` directly. If you want to use `reqwest` but don't depend on it
//! already, use one of the sub-features instead. For details on the meaning of these, see
//! [reqwest's documentation](https://docs.rs/reqwest/0.11/reqwest/#optional-features):
//! * `reqwest-native-tls`
//! * `reqwest-native-tls-alpn`
//! * `reqwest-native-tls-vendored`
//! * `reqwest-rustls-manual-roots`
//! * `reqwest-rustls-webpki-roots`
//! * `reqwest-rustls-native-roots`
#![warn(missing_docs)]
#![cfg_attr(docsrs, feature(doc_cfg))]

View File

@ -55,6 +55,13 @@
//! * `events`
//! * `signatures`
//!
//! # `ruma-client` features
//!
//! The `client` feature activates [`ruma::client`][client], and `client-ext-client-api` activates
//! `ruma-client`s `client-api` feature. All other `client-*` features activate the same feature
//! without the `client-` prefix on `ruma-client`. See the crate's documentation for the effect of
//! these features.
//!
//! If you are viewing this on `docs.rs`, you can have a look at the feature dependencies by
//! clicking **Feature flags** in the toolbar at the top.