Document feature flags
Signed-off-by: Jim Crossley <jim@crossleys.org>
This commit is contained in:
parent
dc81cf6cad
commit
ceb034b813
|
@ -39,7 +39,7 @@ cargo test --all-features --all
|
|||
To build and open the documentation:
|
||||
|
||||
```sh
|
||||
cargo doc --lib --open
|
||||
cargo doc --all-features --lib --open
|
||||
```
|
||||
|
||||
Before performing the PR, once you have committed all changes, run:
|
||||
|
|
|
@ -55,6 +55,6 @@ impl TryIntoTime for String {
|
|||
/// here.
|
||||
///
|
||||
/// Also see:
|
||||
/// * https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#type-system
|
||||
/// * https://tools.ietf.org/html/rfc3986#section-4.1
|
||||
/// * <https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#type-system>
|
||||
/// * <https://tools.ietf.org/html/rfc3986#section-4.1>
|
||||
pub type UriReference = String;
|
||||
|
|
24
src/lib.rs
24
src/lib.rs
|
@ -31,6 +31,30 @@
|
|||
//! * Traits and utilities in [`message`] to implement Protocol Bindings
|
||||
//! * Feature-guarded modules for various Protocol Binding implementations, e.g. actix, reqwest, warp, rdkafka
|
||||
//!
|
||||
//! ## Feature flags
|
||||
//!
|
||||
//! Cloudevents uses a set of [feature flags] to conditionally compile
|
||||
//! only the module associated with the Protocol Binding you need:
|
||||
//!
|
||||
//! - `cloudevents-actix`: Enables the [actix] module. This
|
||||
//! extends the [`actix_web::HttpRequest`] with a
|
||||
//! [`to_event`](actix::HttpRequestExt::to_event) function, the
|
||||
//! [`actix_web::dev::HttpResponseBuilder`] with an
|
||||
//! [`event`](actix::HttpResponseBuilderExt::event) function,
|
||||
//! and implementations for [`actix_web::FromRequest`] and
|
||||
//! [`actix_web::Responder`] in order to take advantage of actix-web's
|
||||
//! [Extractors] and [Responders]
|
||||
//!
|
||||
//! - `cloudevents-reqwest`: Enables the [reqwest] module.
|
||||
//!
|
||||
//! - `cloudevents-warp`: Enables the [warp] module.
|
||||
//!
|
||||
//! - `cloudevents-rdkafka`: Enables the [rdkafka] module to
|
||||
//! seamlessly consume/produce cloudevents within Kafka messages.
|
||||
//!
|
||||
//! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
|
||||
//! [Extractors]: https://actix.rs/docs/extractors/
|
||||
//! [Responders]: https://actix.rs/docs/handlers/
|
||||
|
||||
#![deny(broken_intra_doc_links)]
|
||||
|
||||
|
|
Loading…
Reference in New Issue