[][src]Crate sp_runtime

Runtime Modules shared primitive types.

Re-exports

pub use random_number_generator::RandomNumberGenerator;

Modules

biguint

Re-export big_uint stuff. Infinite precision unsigned integer for substrate runtime.

curve

Provides some utilities to define a piecewise linear function.

generic

Generic implementations of Extrinsic/Header/Block.

helpers_128bit

Re-export 128 bit helpers. Some helper functions to work with 128bit numbers. Note that the functionality provided here is only sensible to use with 128bit numbers because for smaller sizes, you can always rely on assumptions of a bigger type (u128) being available, or simply create a per-thing and use the multiplication implementation provided there.

key_types

Re-export this since it's part of the API of this crate. Known key types; this also functions as a global registry of key types for projects wishing to avoid collisions with each other.

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. An opaque 32-byte cryptographic identifier.

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. An identifier for a specific cryptographic algorithm used by a key pair

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. A fixed point number representation in the range.

FixedI128

Re-export top-level arithmetic stuff. A fixed point number representation in the range.

FixedU128

Re-export top-level arithmetic stuff. A fixed point number representation in the range.

KeyTypeId

Re-export this since it's part of the API of this crate. An identifier for a type of cryptographic key.

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. A fixed point representation of a number in the range [0, 1].

Perbill

Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].

Percent

Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].

Permill

Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].

Perquintill

Re-export top-level arithmetic stuff. A fixed point representation of a number in the range [0, 1].

Rational128

Re-export top-level arithmetic stuff. A wrapper for any rational number with a 128 bit numerator and denominator.

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. Type which has a particular kind of crypto associated with it.

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. Something that implements a decimal fixed point number.

FixedPointOperand

Re-export top-level arithmetic stuff. Integer types that can be used to interact with FixedPointNumber implementations.

PerThing

Re-export top-level arithmetic stuff. Something that implements a fixed point ration with an arbitrary granularity X, as parts per X.

RuntimeAppPublic

A runtime interface for an application's public key.

SaturatedConversion

Re-export top-level arithmetic stuff. Convenience type to work around the highly unergonomic syntax needed to invoke the functions of overloaded generic traits, in this case SaturatedFrom and SaturatedInto.

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. Provide a simple 4 byte identifier for a type.

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. Get the inner type of a PerThing.

Justification

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

UpperOf

Re-export top-level arithmetic stuff. Get the upper type of a PerThing.

Derive Macros

Deserialize
RuntimeDebug

Re-export RuntimeDebug, to avoid dependency clutter.

Serialize