Crate sp_runtime[][src]

Runtime Modules shared primitive types.

Re-exports

pub use random_number_generator::RandomNumberGenerator;

Modules

biguint

Re-export big_uint stuff.

curve

Provides some utilities to define a piecewise linear function.

generic

Generic implementations of Extrinsic/Header/Block.

helpers_128bit

Re-export 128 bit helpers.

key_types

Re-export this since it’s part of the API of this crate.

offchain

A collection of higher lever helpers for offchain calls.

random_number_generator

A simple pseudo random number generator that allows a stream of random numbers to be efficiently created from a single initial seed hash.

testing

Testing utilities.

traits

Primitives for the runtime modules.

transaction_validity

Transaction validity interface.

Macros

__impl_outer_config_types

Helper macro for impl_outer_config

assert_eq_error_rate

Checks that $x is equal to $y with an error rate of $error.

count

Calls a given macro a number of times with a set of fixed params and an incrementing numeral. e.g.

create_runtime_str

Create a const RuntimeString.

impl_opaque_keys

Implement OpaqueKeys for a described struct.

impl_outer_config

Implement the output “meta” module configuration struct, which is basically: pub struct GenesisConfig { rust_module_one: Option, … }

Structs

AccountId32

Re-export this since it’s part of the API of this crate.

AnySignature

Signature verify that can work with any known signature types..

CryptoTypeId

Re-export this since it’s part of the API of this crate.

Digest

Generic header digest.

DispatchErrorWithPostInfo

Result of a Dispatchable which contains the DispatchResult and additional information about the Dispatchable that is only known post dispatch.

FixedI64

Re-export top-level arithmetic stuff.

FixedI128

Re-export top-level arithmetic stuff.

FixedU128

Re-export top-level arithmetic stuff.

KeyTypeId

Re-export this since it’s part of the API of this crate.

ModuleId

A module identifier. These are per module and should be stored in a registry somewhere.

OpaqueExtrinsic

Simple blob to hold an extrinsic without committing to its format and ensure it is serialized correctly.

PerU16

Re-export top-level arithmetic stuff.

Perbill

Re-export top-level arithmetic stuff.

Percent

Re-export top-level arithmetic stuff.

Permill

Re-export top-level arithmetic stuff.

Perquintill

Re-export top-level arithmetic stuff.

Rational128

Re-export top-level arithmetic stuff.

SignatureBatching

Batching session.

Storage

Struct containing data needed for a storage.

StorageChild

Child trie storage data.

Enums

DigestItem

Digest item that is able to encode/decode ‘system’ digest items and provide opaque access to other items.

DispatchError

Reason why a dispatch call failed.

Either

The enum Either with variants Left and Right is a general purpose sum type with two cases.

MultiSignature

Signature verify that can work with any known signature types..

MultiSigner

Public key for any known crypto algorithm.

RuntimeString

A string that wraps a &'static str in the runtime and String/Vec<u8> on decode.

TransactionOutcome

Describes on what should happen with a storage transaction.

Traits

BoundToRuntimeAppPublic

Something that bound to a fixed RuntimeAppPublic.

BuildModuleGenesisStorage

Something that can build the genesis storage of a module.

BuildStorage

Complex storage builder stuff.

CryptoType

Re-export this since it’s part of the API of this crate.

Deserialize

A data structure that can be deserialized from any data format supported by Serde.

DeserializeOwned

A data structure that can be deserialized without borrowing any data from the deserializer.

FixedPointNumber

Re-export top-level arithmetic stuff.

FixedPointOperand

Re-export top-level arithmetic stuff.

PerThing

Re-export top-level arithmetic stuff.

RuntimeAppPublic

A runtime interface for an application’s public key.

SaturatedConversion

Re-export top-level arithmetic stuff.

Serialize

A data structure that can be serialized into any data format supported by Serde.

TypeId

Re-export this since it’s part of the API of this crate.

Functions

print

Print something that implements Printable from the runtime.

verify_encoded_lazy

Verify a signature on an encoded value in a lazy manner. This can be an optimization if the signature scheme has an “unsigned” escape hash.

Type Definitions

ApplyExtrinsicResult

The result of applying of an extrinsic.

ApplyExtrinsicResultWithInfo

Same as ApplyExtrinsicResult but augmented with PostDispatchInfo on success.

ConsensusEngineId

Consensus engine unique ID.

DispatchOutcome

This type specifies the outcome of dispatching a call to a module.

DispatchResult

This is the legacy return type of Dispatchable. It is still exposed for compatibility reasons. The new return type is DispatchResultWithInfo. FRAME runtimes should use frame_support::dispatch::DispatchResult.

DispatchResultWithInfo

Return type of a Dispatchable which contains the DispatchResult and additional information about the Dispatchable that is only known post dispatch.

InnerOf

Re-export top-level arithmetic stuff.

Justification

An abstraction over justification for a block’s validity under a consensus algorithm.

Derive Macros

Deserialize
RuntimeDebug

Re-export RuntimeDebug, to avoid dependency clutter.

Serialize