generate docs for feature gated items (#1332)

* generate docs for feature-gated items on crates.io

* add newline in Cargo.toml

* unify newlines

* fix clippy

* introduce macros for features

* commit missing file

* Update subxt/src/lib.rs

* make it compile
This commit is contained in:
Niklas Adolfsson
2024-01-12 14:18:34 +01:00
committed by GitHub
parent ee95026186
commit 437ff7ee41
20 changed files with 204 additions and 86 deletions
+4 -2
View File
@@ -8,8 +8,9 @@ mod dispatch_error;
use core::fmt::Debug;
#[cfg(feature = "unstable-light-client")]
pub use crate::client::LightClientError;
crate::macros::cfg_unstable_light_client! {
pub use crate::client::LightClientError;
}
// Re-export dispatch error types:
pub use dispatch_error::{
@@ -73,6 +74,7 @@ pub enum Error {
Unknown(Vec<u8>),
/// Light client error.
#[cfg(feature = "unstable-light-client")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable-light-client")))]
#[error("An error occurred but it could not be decoded: {0}")]
LightClient(#[from] LightClientError),
/// Other error.