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:
Guillaume Thiolliere
2020-08-05 13:37:01 +02:00
committed by GitHub
parent e4e0e79ad7
commit 8a37f60844
7 changed files with 54 additions and 40 deletions
+11
View File
@@ -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::*;