File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ exclude = [
1313]
1414categories = [" web-programming" , " encoding" , " data-structures" ]
1515
16+ # Enable all features when building on docs.rs to show feature gated bindings
17+ [package .metadata .docs .rs ]
18+ all-features = true
19+ rustdoc-args = [" --cfg" , " docsrs" ]
20+
1621[lib ]
1722name = " cloudevents"
1823
Original file line number Diff line number Diff line change 11//! Provides protocol binding implementations for [`crate::Event`].
22
3+ #[ cfg_attr( docsrs, doc( cfg( feature = "actix" ) ) ) ]
34#[ cfg( feature = "actix" ) ]
45pub mod actix;
6+ #[ cfg_attr( docsrs, doc( cfg( feature = "axum" ) ) ) ]
57#[ cfg( feature = "axum" ) ]
68pub mod axum;
79#[ cfg( feature = "fe2o3-amqp" ) ]
810pub mod fe2o3_amqp;
11+
12+ #[ cfg_attr(
13+ docsrs,
14+ doc( cfg( any(
15+ feature = "http-binding" ,
16+ feature = "actix" ,
17+ feature = "warp" ,
18+ feature = "reqwest" ,
19+ feature = "axum" ,
20+ feature = "poem"
21+ ) ) )
22+ ) ]
923#[ cfg( any(
1024 feature = "http-binding" ,
1125 feature = "actix" ,
@@ -15,14 +29,19 @@ pub mod fe2o3_amqp;
1529 feature = "poem"
1630) ) ]
1731pub mod http;
32+ #[ cfg_attr( docsrs, doc( cfg( feature = "nats" ) ) ) ]
1833#[ cfg( feature = "nats" ) ]
1934pub mod nats;
35+ #[ cfg_attr( docsrs, doc( cfg( feature = "poem" ) ) ) ]
2036#[ cfg( feature = "poem" ) ]
2137pub mod poem;
38+ #[ cfg_attr( docsrs, doc( cfg( feature = "rdkafka" ) ) ) ]
2239#[ cfg( feature = "rdkafka" ) ]
2340pub mod rdkafka;
41+ #[ cfg_attr( docsrs, doc( cfg( feature = "reqwest" ) ) ) ]
2442#[ cfg( feature = "reqwest" ) ]
2543pub mod reqwest;
44+ #[ cfg_attr( docsrs, doc( cfg( feature = "warp" ) ) ) ]
2645#[ cfg( feature = "warp" ) ]
2746pub mod warp;
2847
Original file line number Diff line number Diff line change 5656
5757#![ doc( html_root_url = "https://docs.rs/cloudevents-sdk/0.5.0" ) ]
5858#![ deny( rustdoc:: broken_intra_doc_links) ]
59+ #![ cfg_attr( docsrs, feature( doc_cfg) ) ] // Show feature gate in doc
5960
6061pub mod binding;
6162pub mod event;
You can’t perform that action at this time.
0 commit comments