diff --git a/regtest/Cargo.toml b/regtest/Cargo.toml index 11f8d9b..498e6f9 100644 --- a/regtest/Cargo.toml +++ b/regtest/Cargo.toml @@ -65,7 +65,7 @@ anyhow = "1.0.66" [package.metadata.docs.rs] -features = ["download", "doc"] +features = ["download", "doc", "26_0"] rustdoc-args = ["--cfg", "docsrs"] [patch.crates-io.bitcoind-json-rpc-client] diff --git a/regtest/src/client_versions.rs b/regtest/src/client_versions.rs index e64ab32..ae854c1 100644 --- a/regtest/src/client_versions.rs +++ b/regtest/src/client_versions.rs @@ -1,4 +1,10 @@ // All features uses 26_0 +/// The version specific client and json types. +/// +/// **THIS IS AVAILABLE FOR ALL VERSION NUMBER FEATURES** (eg `25_0`, `24_2` etc). This crate is +/// unusual in that it expects exactly one version number feature to be selected, docs.rs is not set +/// up to handle such oddity. +/// #[cfg(feature = "26_0")] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; @@ -67,7 +73,7 @@ pub use bitcoind_json_rpc_client::{client_sync::v18::{Client, AddressType}, json #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v17::{Client, AddressType}, json::v17 as json}; -// To make --no-default-features work we have to enable some feature, use most recent version same as for default. +// To make --no-default-features work we have to re-export a the types, use most recent version same as we do for all features. #[cfg(all(not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feature = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_1")))] #[allow(unused_imports)] // Not all users need the json types. pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; diff --git a/regtest/src/lib.rs b/regtest/src/lib.rs index cadb9a3..e54a469 100644 --- a/regtest/src/lib.rs +++ b/regtest/src/lib.rs @@ -21,6 +21,7 @@ use tempfile::TempDir; pub use {anyhow, tempfile, which}; #[rustfmt::skip] // Keep pubic re-exports separate. +#[doc(inline)] pub use self::{ client_versions::{json, Client, AddressType}, versions::VERSION,