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,
32	stable::PsmInterface,
33	BalanceStatus, ExistenceRequirement, Locker, WithdrawReasons,
34};
35
36mod members;
37pub use members::{
38	AsContains, ChangeMembers, Contains, ContainsLengthBound, ContainsPair, Equals, Everything,
39	EverythingBut, FromContains, FromContainsPair, InitializeMembers, InsideBoth, IsInVec, Nothing,
40	RankedMembers, RankedMembersSwapHandler, SortedMembers, TheseExcept,
41};
42
43mod validation;
44pub use validation::{
45	DisabledValidators, EstimateNextNewSession, EstimateNextSessionRotation, FindAuthor,
46	KeyOwnerProofSystem, Lateness, OneSessionHandler, ValidatorRegistration, ValidatorSet,
47	ValidatorSetWithIdentification, VerifySeal,
48};
49
50mod error;
51pub use error::PalletError;
52
53mod filter;
54pub use filter::{ClearFilterGuard, FilterStack, FilterStackGuard, InstanceFilter};
55
56mod misc;
57pub use misc::{
58	defensive_prelude::{self, *},
59	AccountTouch, Backing, ConstBool, ConstI128, ConstI16, ConstI32, ConstI64, ConstI8, ConstInt,
60	ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, ConstUint, DefensiveMax, DefensiveMin,
61	DefensiveSaturating, DefensiveTruncateFrom, DefensiveTruncateInto, EqualPrivilegeOnly,
62	EstimateCallFee, ExecuteBlock, Get, GetBacking, GetDefault, HandleLifetime, InherentBuilder,
63	IsInherent, IsSubType, IsType, Len, OffchainWorker, OnKilledAccount, OnNewAccount,
64	PrivilegeCmp, RewardsReporter, SameOrOther, SignedTransactionBuilder, Time, TryCollect,
65	TryDrop, TypedGet, UnixTime, VariantCount, VariantCountOf, WrapperKeepOpaque, WrapperOpaque,
66};
67#[allow(deprecated)]
68pub use misc::{PreimageProvider, PreimageRecipient};
69#[doc(hidden)]
70pub use misc::{DEFENSIVE_OP_INTERNAL_ERROR, DEFENSIVE_OP_PUBLIC_ERROR};
71
72mod stored_map;
73pub use stored_map::{StorageMapShim, StoredMap};
74mod randomness;
75pub use randomness::Randomness;
76pub mod reality;
77
78mod metadata;
79pub use metadata::{
80	CallMetadata, CrateVersion, GetCallIndex, GetCallMetadata, GetCallName, GetStorageVersion,
81	NoStorageVersionSet, PalletInfo, PalletInfoAccess, PalletInfoData, PalletsInfoAccess,
82	StorageVersion, STORAGE_VERSION_STORAGE_KEY_POSTFIX,
83};
84
85mod hooks;
86#[allow(deprecated)]
87pub use hooks::GenesisBuild;
88pub use hooks::{
89	BeforeAllRuntimeMigrations, BuildGenesisConfig, Hooks, IntegrityTest, OnFinalize, OnGenesis,
90	OnIdle, OnInitialize, OnPoll, OnRuntimeUpgrade, OnTimestampSet, PostInherents,
91	PostTransactions, PreInherents, UncheckedOnRuntimeUpgrade,
92};
93
94pub mod schedule;
95mod storage;
96#[cfg(feature = "experimental")]
97pub use storage::MaybeConsideration;
98pub use storage::{
99	Consideration, ConstantStoragePrice, Disabled, Footprint, Incrementable, Instance,
100	LinearStoragePrice, NoDrop, PartialStorageInfoTrait, StorageInfo, StorageInfoTrait,
101	StorageInstance, SuppressedDrop, TrackedStorageKey, WhitelistedStorageKeys,
102};
103
104mod dispatch;
105pub use dispatch::{
106	AsEnsureOriginWithArg, Authorize, CallerTrait, EitherOf, EitherOfDiverse, EnsureOrigin,
107	EnsureOriginEqualOrHigherPrivilege, EnsureOriginWithArg, MapSuccess, NeverEnsureOrigin,
108	OriginTrait, TryMapSuccess, TryWithMorphedArg, UnfilteredDispatchable,
109};
110
111mod voting;
112pub use voting::{ClassCountOf, NoOpPoll, PollStatus, Polling, VoteTally};
113
114mod preimages;
115pub use preimages::{Bounded, BoundedInline, FetchResult, QueryPreimage, StorePreimage};
116
117mod messages;
118pub use messages::{
119	BatchFootprint, BatchesFootprints, EnqueueMessage, EnqueueWithOrigin, ExecuteOverweightError,
120	HandleMessage, NoopServiceQueues, ProcessMessage, ProcessMessageError, QueueFootprint,
121	QueueFootprintQuery, QueuePausedQuery, ServiceQueues, TransformOrigin,
122};
123
124mod safe_mode;
125pub use safe_mode::{SafeMode, SafeModeError, SafeModeNotify};
126
127mod tx_pause;
128pub use tx_pause::{TransactionPause, TransactionPauseError};
129
130pub mod dynamic_params;
131
132pub mod tasks;
133pub use tasks::Task;
134
135mod proving;
136pub use proving::*;
137
138mod rewards;
139pub use rewards::RewardsPool;
140
141#[cfg(feature = "try-runtime")]
142mod try_runtime;
143#[cfg(feature = "try-runtime")]
144pub use try_runtime::{
145	Select as TryStateSelect, TryDecodeEntireStorage, TryDecodeEntireStorageError, TryState,
146	UpgradeCheckSelect,
147};