Docs.rs
  • frame-support-33.0.0
    • frame-support 33.0.0
    • Docs.rs crate page
    • Apache-2.0
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • github:paritytech:core-devs
    • parity-crate-owner
    • Dependencies
      • aquamarine ^0.5.0 normal
      • array-bytes ^6.1 normal
      • bitflags ^1.3 normal
      • parity-scale-codec ^3.6.1 normal
      • docify ^0.2.8 normal
      • environmental ^1.1.4 normal
      • frame-metadata ^16.0.0 normal
      • frame-support-procedural ^28.0.0 normal
      • impl-trait-for-tuples ^0.2.2 normal
      • k256 ^0.13.1 normal
      • log ^0.4.21 normal
      • macro_magic ^0.5.0 normal
      • paste ^1.0 normal
      • scale-info ^2.11.1 normal
      • serde ^1.0.197 normal
      • serde_json ^1.0.114 normal
      • smallvec ^1.11.0 normal
      • sp-api ^31.0.0 normal
      • sp-arithmetic ^26.0.0 normal
      • sp-core ^32.0.0 normal
      • sp-crypto-hashing-proc-macro ^0.1.0 normal
      • sp-debug-derive ^14.0.0 normal
      • sp-genesis-builder ^0.12.0 normal
      • sp-inherents ^31.0.0 normal
      • sp-io ^35.0.0 normal
      • sp-metadata-ir ^0.7.0 normal
      • sp-runtime ^36.0.0 normal
      • sp-staking ^31.0.0 normal
      • sp-state-machine ^0.40.0 normal optional
      • sp-std ^14.0.0 normal
      • sp-tracing ^17.0.0 normal
      • sp-weights ^31.0.0 normal
      • static_assertions ^1.1.0 normal
      • tt-call ^1.0.8 normal
      • assert_matches ^1.3.0 dev
      • pretty_assertions ^1.2.1 dev
    • Versions
    • 93.45% of the crate is documented
  • Go to latest version
  • Platform
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate frame_support

frame_support33.0.0

  • All Items
  • Re-exports
  • Modules
  • Macros
  • Structs
  • Enums
  • Constants
  • Traits
  • Functions
  • Type Aliases
  • Attribute Macros
  • Derive Macros

Crates

  • frame_support
?
Settings

Crate frame_support

source ·
Expand description

Support code for the runtime.

§Note on Tuple Traits

Many of the traits defined in traits have auto-implementations on tuples as well. Usually, the tuple is a function of number of pallets in the runtime. By default, the traits are implemented for tuples of up to 64 items.

Re-exports§

  • pub use self::storage::storage_noop_guard::StorageNoopGuard;
  • pub use self::dispatch::Callable;
  • pub use self::dispatch::Parameter;
  • pub use self::storage::migration;
  • pub use self::storage::IterableStorageDoubleMap;
  • pub use self::storage::IterableStorageMap;
  • pub use self::storage::IterableStorageNMap;
  • pub use self::storage::StorageDoubleMap;
  • pub use self::storage::StorageMap;
  • pub use self::storage::StorageNMap;
  • pub use self::storage::StoragePrefixedMap;
  • pub use self::storage::StorageValue;
  • pub use sp_runtime;

Modules§

  • crypto
    Utilities for dealing with crypto primitives. Sometimes we need to use these from inside WASM contracts, where crypto calculations have weak performance.
  • dispatch
    Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.
  • dispatch_context
    Provides functions to interact with the dispatch context.
  • errorDeprecated
  • genesis_builder_helper
    Helper functions for implementing sp_genesis_builder::GenesisBuilder for runtimes.
  • inherent
  • instances
    Some instance placeholder to be used in frame_support::pallet attribute macro.
  • migrations
  • pallet_macros
    Contains macro stubs for all of the pallet:: macros
  • pallet_prelude
    Prelude to be used alongside pallet macro, for ease of use.
  • storage
    Stuff to do with the runtime’s storage.
  • testing_prelude
    Prelude to be used for pallet testing, for ease of use.
  • traits
    Traits and associated utilities for use in the FRAME environment.
  • weights
    Re-exports sp-weights public API, and contains benchmarked weight constants specific to FRAME.

Macros§

  • _std_enabled
    Enable/disable the given code depending on feature = "std" being enabled for the crate or not.
  • assert_err
    Assert an expression returns an error specified.
  • assert_err_ignore_postinfo
    Assert an expression returns an error specified.
  • assert_err_with_weight
    Assert an expression returns error with the given weight.
  • assert_error_encoded_size
    Assert that the maximum encoding size does not exceed the value defined in MAX_MODULE_ERROR_ENCODED_SIZE during compilation.
  • assert_noop
    Evaluate an expression, assert it returns an expected Err value and that runtime storage has not been mutated (i.e. expression is a no-operation).
  • assert_ok
    Panic if an expression doesn’t evaluate to Ok.
  • assert_storage_noop
    Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).
  • construct_runtime
    Construct a runtime, with the given name and the given pallets.
  • crate_to_crate_version
    Convert the current crate version into a CrateVersion.
  • defensive
    Generic function to mark an execution path as ONLY defensive.
  • defensive_assert
    Trigger a defensive failure if a condition is not met.
  • ensure
    Evaluate $x:expr and if not true return Err($y:expr).
  • fail
    Return Err of the expression: return Err($expression);.
  • impl_ensure_origin_with_arg_ignoring_arg
    Simple macro to explicitly implement EnsureOriginWithArg to be used on any type which implements EnsureOrigin. This is quick and dirty, so you must use the type parameters O (the origin type), T (the argument type) and AccountId (if you are using the O: .. form).
  • impl_filter_stack
  • match_and_insert
    Macro that inserts some tokens after the first match of some pattern.
  • match_typeDeprecated
    Create a type which implements the Contains trait for a particular type with syntax similar to matches!.
  • match_types
    Create a type which implements the Contains trait for a particular type with syntax similar to matches!.
  • ord_parameter_types
    Macro for easily creating a new implementation of both the Get and Contains traits. Use exactly as with parameter_types, only the type must be Ord.
  • parameter_types
    Create new implementations of the Get trait.
  • parameter_types_impl_thread_local
  • runtime_print
    Print out a formatted message.

Structs§

  • Blake2_128
    Hash storage keys with blake2 128
  • Blake2_128Concat
    Hash storage keys with concat(blake2_128(key), key)
  • Blake2_256
    Hash storage keys with blake2 256
  • BoundedBTreeMap
    A bounded map based on a B-Tree.
  • BoundedBTreeSet
    A bounded set based on a B-Tree.
  • BoundedSlice
    A bounded slice.
  • BoundedVec
    A bounded vector.
  • Identity
    Store the key directly.
  • PalletId
    A pallet identifier. These are per pallet and should be stored in a registry somewhere.
  • Twox64Concat
    Hash storage keys with concat(twox64(key), key)
  • Twox128
    Hash storage keys with twox 128
  • Twox256
    Hash storage keys with twox 256
  • WeakBoundedVec
    A weakly bounded vector.

Enums§

  • Never
    A type that cannot be instantiated.

Constants§

  • LOG_TARGET
    A unified log target for support operations.
  • MAX_MODULE_ERROR_ENCODED_SIZE
    The number of bytes of the module-specific error field defined in ModuleError. In FRAME, this is the maximum encoded size of a pallet error type.

Traits§

  • Hashable
  • Printable
    Trait for things which can be printed from the runtime.
  • ReversibleStorageHasher
    Hasher to use to hash keys to insert to storage.
  • StorageHasher
    Hasher to use to hash keys to insert to storage.

Functions§

  • debug
    Print out the debuggable type.
  • print
    Print something that implements Printable from the runtime.

Type Aliases§

  • ConsensusEngineId
    Consensus engine unique ID.

Attribute Macros§

  • derive_impl
    This attribute can be used to derive a full implementation of a trait based on a local partial impl and an external impl containing defaults that can be overridden in the local impl.
  • pallet
    The pallet macro has 2 purposes:
  • register_default_impl
    Attach this attribute to an impl statement that you want to use with #[derive_impl(..)].
  • require_transactional
    Assert the annotated function is executed within a storage transaction.
  • storage_alias
    Generate a #[pallet::storage] alias outside of a pallet.
  • transactional
    Execute the annotated function in a new storage transaction.

Derive Macros§

  • CloneNoBound
    Derive Clone but do not bound any generic.
  • DebugNoBound
    Derive Debug but do not bound any generic.
  • DefaultNoBound
    Derive Default but do not bound any generic.
  • EqNoBound
    Derive Eq but do not bound any generic.
  • OrdNoBound
    Derive Ord but do not bound any generic.
  • PalletError
  • PartialEqNoBound
    Derive PartialEq but do not bound any generic.
  • PartialOrdNoBound
    Derive PartialOrd but do not bound any generic.
  • RuntimeDebugNoBound
    Derive [Debug], if std is enabled it uses frame_support::DebugNoBound, if std is not enabled it just returns "<wasm:stripped>". This behaviour is useful to prevent bloating the runtime WASM blob from unneeded code.

Results

trait
frame_support::traits::ProcessMessage
Can process messages from a specific origin.
trait method
frame_support::traits::ProcessMessage::process_message
Process the given message, using no more than the …
enum
frame_support::traits::ProcessMessageError
Errors that can happen when attempting to process a …
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.