Move IsSubType and write some docs for the trait (#7350)

* Move `IsSubType` and write some docs for the trait

This moves the `IsSubType` trait from dispatch.rs to traits.rs. It also
adds docs to make the trait better understandable.

* Update frame/support/src/traits.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Bastian Köcher
2020-10-19 10:24:13 +02:00
committed by GitHub
parent 74e8691aa8
commit 87c18598fc
7 changed files with 58 additions and 16 deletions
+2 -3
View File
@@ -44,9 +44,8 @@ use sp_io::hashing::blake2_256;
use sp_runtime::{DispatchResult, traits::{Dispatchable, Zero, Hash, Member, Saturating}};
use frame_support::{
decl_module, decl_event, decl_error, decl_storage, Parameter, ensure, RuntimeDebug, traits::{
Get, ReservableCurrency, Currency, InstanceFilter, OriginTrait, IsType,
}, weights::{Weight, GetDispatchInfo},
dispatch::{PostDispatchInfo, IsSubType}, storage::IterableStorageMap,
Get, ReservableCurrency, Currency, InstanceFilter, OriginTrait, IsType, IsSubType,
}, weights::{Weight, GetDispatchInfo}, dispatch::PostDispatchInfo, storage::IterableStorageMap,
};
use frame_system::{self as system, ensure_signed};
use frame_support::dispatch::DispatchError;