[][src]Crate srml_support

Support code for the runtime.

Re-exports

pub use serde;
pub use sr_primitives as runtime_primitives;
pub use self::storage::hashed::generator::HashedStorage;
pub use self::storage::hashed::generator::Twox256;
pub use self::storage::hashed::generator::Twox128;
pub use self::storage::hashed::generator::Blake2_256;
pub use self::storage::hashed::generator::Blake2_128;
pub use self::storage::hashed::generator::Twox64Concat;
pub use self::storage::unhashed::generator::UnhashedStorage;
pub use self::storage::StorageValue;
pub use self::storage::StorageMap;
pub use self::storage::EnumerableStorageMap;
pub use self::storage::StorageDoubleMap;
pub use self::storage::AppendableStorageMap;
pub use self::dispatch::Parameter;
pub use self::dispatch::Dispatchable;
pub use self::dispatch::Callable;
pub use self::dispatch::IsSubType;
pub use srml_support_procedural::decl_storage;

Modules

dispatch

Dispatch system. Contains a macro for defining runtime modules and generating values representing lazy module function calls.

event

Macros that define an Event types. Events can be used to easily report changes or conditions in your runtime to external entities like users, chain explorers, or dApps.

inherent
metadata
storage

Stuff to do with the runtime's storage.

traits

Traits for SRML.

unsigned

Macros

assert_eq_uvec

Panic when the vectors are different, without taking the order into account.

assert_err

Panic if an expression doesn't evaluate to an Err.

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.

construct_runtime

Construct a runtime, with the given name and the given modules.

decl_event

Implement the Event for a module.

decl_module

Declares a Module struct and a Call enum, which implements the dispatch logic.

ensure

Evaluate $x:expr and if not true return Err($y:expr).

fail

Return Err of the expression: return Err($expression);.

for_each_tuple

Programatically create derivations for tuples of up to 19 elements. You provide a second macro which is called once per tuple size, along with a number of identifiers, one for each element of the tuple.

impl_outer_dispatch

Implement a meta-dispatch module to dispatch to other dispatchers.

impl_outer_event

Constructs an Event type for a runtime. This is usually called automatically by the construct_runtime macro. See also __create_decl_macro.

impl_outer_inherent

Implement the outer inherent. All given modules need to implement ProvideInherent.

impl_outer_origin

Constructs an Origin type for a runtime. This is usually called automatically by the construct_runtime macro. See also __create_decl_macro.

impl_outer_validate_unsigned

Implement ValidateUnsigned for Runtime. All given modules need to implement ValidateUnsigned.

impl_runtime_metadata

Implements the metadata support for the given runtime and all its modules.

parameter_types

Macro for easily creating a new implementation of the Get trait. Use similarly to how you would declare a const:

storage_items

Declares strongly-typed wrappers around codec-compatible types in storage.

Enums

Void

The void type - it cannot exist.

Traits

Hashable
StorageDoubleMapWithHasher

An implementation of a map with a two keys.

Functions

print

Print a printable value.

storage_root

"Commit" all existing operations and compute the resultant storage root.