mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 16:08:00 +00:00
Propagate documentation to runtime API (#511)
* codegen: Propagate documentation for Constants Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update polkadot.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Propagate documentation for `CompositeDef` wrapper Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update polkadot.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Propagate docs for enum variant of `CompositeDef` wrapper Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update polkadot.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Propagate docs for Storage entries Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update polkadot.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Move docs from internal structs to methods of StorageApi Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Propagate the same docs for storage iter variants Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * codegen: Move docs from call structs to methods of TransactionApi Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * subxt: Update polkadot.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -248,8 +248,11 @@ fn generate_storage_entry_fns(
|
||||
}
|
||||
};
|
||||
|
||||
let docs = &storage_entry.docs;
|
||||
let docs_token = quote! { #( #[doc = #docs ] )* };
|
||||
let client_iter_fn = if matches!(storage_entry.ty, StorageEntryType::Map { .. }) {
|
||||
quote! (
|
||||
#docs_token
|
||||
pub async fn #fn_name_iter(
|
||||
&self,
|
||||
hash: ::core::option::Option<T::Hash>,
|
||||
@@ -271,7 +274,9 @@ fn generate_storage_entry_fns(
|
||||
};
|
||||
quote!( #field_name: #reference #field_ty )
|
||||
});
|
||||
|
||||
let client_fns = quote! {
|
||||
#docs_token
|
||||
pub async fn #fn_name(
|
||||
&self,
|
||||
#( #key_args, )*
|
||||
|
||||
Reference in New Issue
Block a user