Skip to content

Commit dea5b92

Browse files
author
lif
committed
Clearer documentation around the new generated bindings
1 parent fb6ca65 commit dea5b92

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

lib/propolis-client/src/lib.rs

+19-4
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,33 @@
55
//! which is opt-in at present with crate feature `generated`, and additional
66
//! compatibility impls and re-exports to approximate the former handmade
77
//! bindings' module layout with crate feature `generated-migration`.
8+
//!
9+
//! Presently, when built with the `generated` flag, the legacy handmade
10+
//! bindings are available in the `handmade` submodule.
11+
12+
#![cfg_attr(
13+
feature = "generated",
14+
doc = "This documentation was built with the `generated` feature **on**."
15+
)]
16+
#![cfg_attr(
17+
not(feature = "generated"),
18+
doc = "This documentation was built with the `generated` feature **off**."
19+
)]
820

921
pub mod instance_spec;
1022

1123
#[cfg(feature = "generated")]
12-
pub mod generated;
13-
pub mod handmade;
24+
mod generated;
25+
#[cfg(feature = "generated")]
26+
pub use generated::*;
1427

28+
#[cfg(feature = "generated")]
29+
pub mod handmade;
30+
#[cfg(not(feature = "generated"))]
31+
mod handmade;
1532
#[cfg(not(feature = "generated"))]
1633
pub use handmade::*;
1734

18-
#[cfg(feature = "generated")]
19-
pub use generated::*;
2035
#[cfg(feature = "generated-migration")]
2136
pub use types as api;
2237
#[cfg(feature = "generated-migration")]

0 commit comments

Comments
 (0)