mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Remove generation of instance trait by decl_storage. (#6812)
* remove generation of instance trait, no breaking change * doc * doc * Update frame/support/src/traits.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/support/procedural/src/storage/instance_trait.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e4e0e79ad7
commit
8a37f60844
@@ -1653,6 +1653,17 @@ impl<T> IsType<T> for T {
|
||||
fn into_mut(&mut self) -> &mut T { self }
|
||||
}
|
||||
|
||||
/// An instance of a pallet in the storage.
|
||||
///
|
||||
/// It is required that these instances are unique, to support multiple instances per pallet in the same runtime!
|
||||
///
|
||||
/// E.g. for module MyModule default instance will have prefix "MyModule" and other instances
|
||||
/// "InstanceNMyModule".
|
||||
pub trait Instance: 'static {
|
||||
/// Unique module prefix. E.g. "InstanceNMyModule" or "MyModule"
|
||||
const PREFIX: &'static str ;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user