diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec4a882..776a8ac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: diff --git a/src/event/types.rs b/src/event/types.rs index 2a8720f..db3f3f7 100644 --- a/src/event/types.rs +++ b/src/event/types.rs @@ -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 +/// * +/// * pub type UriReference = String; diff --git a/src/lib.rs b/src/lib.rs index d78c7b9..dd386b0 100644 --- a/src/lib.rs +++ b/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)]