mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 02:51:08 +00:00
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:
+5
-2
@@ -9,6 +9,8 @@
|
||||
//! additional and signed extra parameters are used when constructing an extrinsic, and is a part
|
||||
//! of the chain configuration (see [`crate::config::Config`]).
|
||||
|
||||
use crate::macros::cfg_substrate_compat;
|
||||
|
||||
mod signer;
|
||||
mod tx_client;
|
||||
mod tx_payload;
|
||||
@@ -16,8 +18,9 @@ mod tx_progress;
|
||||
|
||||
// The PairSigner impl currently relies on Substrate bits and pieces, so make it an optional
|
||||
// feature if we want to avoid needing sp_core and sp_runtime.
|
||||
#[cfg(feature = "substrate-compat")]
|
||||
pub use self::signer::PairSigner;
|
||||
cfg_substrate_compat! {
|
||||
pub use self::signer::PairSigner;
|
||||
}
|
||||
|
||||
pub use self::{
|
||||
signer::Signer,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
//! A library to **sub**mit e**xt**rinsics to a
|
||||
//! [substrate](https://github.com/paritytech/substrate) node via RPC.
|
||||
|
||||
use crate::macros::cfg_substrate_compat;
|
||||
use crate::Config;
|
||||
|
||||
/// Signing transactions requires a [`Signer`]. This is responsible for
|
||||
@@ -24,8 +25,9 @@ pub trait Signer<T: Config> {
|
||||
fn sign(&self, signer_payload: &[u8]) -> T::Signature;
|
||||
}
|
||||
|
||||
#[cfg(feature = "substrate-compat")]
|
||||
pub use pair_signer::PairSigner;
|
||||
cfg_substrate_compat! {
|
||||
pub use pair_signer::PairSigner;
|
||||
}
|
||||
|
||||
// A signer suitable for substrate based chains. This provides compatibility with Substrate
|
||||
// packages like sp_keyring and such, and so relies on sp_core and sp_runtime to be included.
|
||||
|
||||
Reference in New Issue
Block a user