referrerpolicy=no-referrer-when-downgrade

frame_support/
traits.rs

1// This file is part of Substrate.
2
3// Copyright (C) Parity Technologies (UK) Ltd.
4// SPDX-License-Identifier: Apache-2.0
5
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// 	http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17
18//! Traits and associated utilities for use in the FRAME environment.
19//!
20//! NOTE: If you're looking for `parameter_types`, it has moved in to the top-level module.
21
22pub mod tokens;
23pub use tokens::{
24	currency::{
25		ActiveIssuanceOf, Currency, InspectLockableCurrency, LockIdentifier, LockableCurrency,
26		NamedReservableCurrency, ReservableCurrency, TotalIssuanceOf, VestedTransfer,
27		VestingSchedule,
28	},
29	fungible, fungibles,
30	imbalance::{Imbalance, OnUnbalanced, SignedImbalance},
31	nonfungible, nonfungible_v2, nonfungibles, nonfungibles_v2, BalanceStatus,
32	ExistenceRequirement, Locker, WithdrawReasons,
33};
34
35mod members;
36pub use members::{
37	AsContains, ChangeMembers, Contains, ContainsLengthBound, ContainsPair, Equals, Everything,
38	EverythingBut, FromContains, FromContainsPair, InitializeMembers, InsideBoth, IsInVec, Nothing,
39	RankedMembers, RankedMembersSwapHandler, SortedMembers, TheseExcept,
40};
41
42mod validation;
43pub use validation::{
44	DisabledValidators, EstimateNextNewSession, EstimateNextSessionRotation, FindAuthor,
45	KeyOwnerProofSystem, Lateness, OneSessionHandler, ValidatorRegistration, ValidatorSet,
46	ValidatorSetWithIdentification, VerifySeal,
47};
48
49mod error;
50pub use error::PalletError;
51
52mod filter;
53pub use filter::{ClearFilterGuard, FilterStack, FilterStackGuard, InstanceFilter};
54
55mod misc;
56pub use misc::{
57	defensive_prelude::{self, *},
58	AccountTouch, Backing, ConstBool, ConstI128, ConstI16, ConstI32, ConstI64, ConstI8, ConstInt,
59	ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, ConstUint, DefensiveMax, DefensiveMin,
60	DefensiveSaturating, DefensiveTruncateFrom, DefensiveTruncateInto, EqualPrivilegeOnly,
61	EstimateCallFee, ExecuteBlock, Get, GetBacking, GetDefault, HandleLifetime, InherentBuilder,
62	IsInherent, IsSubType, IsType, Len, OffchainWorker, OnKilledAccount, OnNewAccount,
63	PrivilegeCmp, RewardsReporter, SameOrOther, SignedTransactionBuilder, Time, TryCollect,
64	TryDrop, TypedGet, UnixTime, VariantCount, VariantCountOf, WrapperKeepOpaque, WrapperOpaque,
65};
66#[allow(deprecated)]
67pub use misc::{PreimageProvider, PreimageRecipient};
68#[doc(hidden)]
69pub use misc::{DEFENSIVE_OP_INTERNAL_ERROR, DEFENSIVE_OP_PUBLIC_ERROR};
70
71mod stored_map;
72pub use stored_map::{StorageMapShim, StoredMap};
73mod randomness;
74pub use randomness::Randomness;
75pub mod reality;
76
77mod metadata;
78pub use metadata::{
79	CallMetadata, CrateVersion, GetCallIndex, GetCallMetadata, GetCallName, GetStorageVersion,
80	NoStorageVersionSet, PalletInfo, PalletInfoAccess, PalletInfoData, PalletsInfoAccess,
81	StorageVersion, STORAGE_VERSION_STORAGE_KEY_POSTFIX,
82};
83
84mod hooks;
85pub use hooks::{
86	BeforeAllRuntimeMigrations, BuildGenesisConfig, Hooks, IntegrityTest, OnFinalize, OnGenesis,
87	OnIdle, OnInitialize, OnPoll, OnRuntimeUpgrade, OnTimestampSet, PostInherents,
88	PostTransactions, PreInherents, UncheckedOnRuntimeUpgrade,
89};
90
91pub mod schedule;
92mod storage;
93pub use storage::{
94	Consideration, ConstantStoragePrice, Disabled, Footprint, Incrementable, Instance,
95	LinearStoragePrice, MaybeConsideration, NoDrop, PartialStorageInfoTrait, StorageInfo,
96	StorageInfoTrait, StorageInstance, SuppressedDrop, TrackedStorageKey, WhitelistedStorageKeys,
97};
98
99mod dispatch;
100pub use dispatch::{
101	AsEnsureOriginWithArg, Authorize, CallerTrait, EitherOf, EitherOfDiverse, EnsureOrigin,
102	EnsureOriginEqualOrHigherPrivilege, EnsureOriginWithArg, MapSuccess, NeverEnsureOrigin,
103	OriginTrait, TryMapSuccess, TryWithMorphedArg, UnfilteredDispatchable,
104};
105
106mod voting;
107pub use voting::{ClassCountOf, NoOpPoll, PollStatus, Polling, VoteTally};
108
109mod preimages;
110pub use preimages::{Bounded, BoundedInline, FetchResult, QueryPreimage, StorePreimage};
111
112mod messages;
113pub use messages::{
114	BatchFootprint, BatchesFootprints, EnqueueMessage, EnqueueWithOrigin, ExecuteOverweightError,
115	HandleMessage, NoopServiceQueues, ProcessMessage, ProcessMessageError, QueueFootprint,
116	QueueFootprintQuery, QueuePausedQuery, ServiceQueues, TransformOrigin,
117};
118
119mod safe_mode;
120pub use safe_mode::{SafeMode, SafeModeError, SafeModeNotify};
121
122mod tx_pause;
123pub use tx_pause::{TransactionPause, TransactionPauseError};
124
125pub mod dynamic_params;
126
127pub mod tasks;
128pub use tasks::Task;
129
130mod proving;
131pub use proving::*;
132
133mod rewards;
134pub use rewards::RewardsPool;
135
136#[cfg(feature = "try-runtime")]
137mod try_runtime;
138#[cfg(feature = "try-runtime")]
139pub use try_runtime::{
140	Select as TryStateSelect, TryDecodeEntireStorage, TryDecodeEntireStorageError, TryState,
141	UpgradeCheckSelect,
142};