mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 02:11:07 +00:00
Allow where bounds on decl_module! and decl_storage! (#3000)
* Introduces a `where` bound to `decl_macro!` and `decl_storage!` * More fixes * Adds documentation
This commit is contained in:
@@ -139,6 +139,14 @@ use proc_macro::TokenStream;
|
||||
/// Accessing the structure no requires the instance as generic parameter:
|
||||
/// * `Foo::<I>` if the value type is not generic
|
||||
/// * `Foo::<T, I>` if the value type is generic
|
||||
///
|
||||
/// ## Where clause
|
||||
///
|
||||
/// This macro supports a where clause which will be replicated to all generated types.
|
||||
///
|
||||
/// ```nocompile
|
||||
/// trait Store for Module<T: Trait> as Example where T::AccountId: std::fmt::Display {}
|
||||
/// ```
|
||||
#[proc_macro]
|
||||
pub fn decl_storage(input: TokenStream) -> TokenStream {
|
||||
storage::transformation::decl_storage_impl(input)
|
||||
|
||||
Reference in New Issue
Block a user