[−][src]Module sp_runtime::traits
Primitives for the runtime modules.
Structs
| ApiRef | Auxiliary wrapper that holds an api instance and binds it to the given lifetime. |
| AppendZerosInput | Input that adds infinite number of zero after wrapped input. |
| BadOrigin | An error type that indicates that the origin is invalid. |
| BlakeTwo256 | Blake2-256 Hash implementation. |
| ConvertInto | A structure that performs standard conversion using the standard Rust conversion traits. |
| Identity | A structure that performs identity conversion. |
| IdentityLookup | A lookup implementation returning the input value. |
| LookupError | An error that indicates that a lookup failed. |
| TrailingZeroInput | Input that adds infinite number of zero after wrapped input. |
Traits
| AccountIdConversion | This type can be converted into and possibly from an AccountId (which itself is generic). |
| AppVerify | Means of signature verification of an application key. |
| Applyable | An "executable" piece of information, used by the standard Substrate Executive in order to enact a piece of extrinsic information by marshalling and dispatching to a named function call. |
| BlindCheckable | A "checkable" piece of information, used by the standard Substrate Executive in order to check the validity of a piece of extrinsic information, usually by verifying the signature. Implement for pieces of information that don't require additional context in order to be checked. |
| Block | Something which fulfills the abstract idea of a Substrate block. It has types for
|
| BlockIdTo | Something that can convert a [ |
| Bounded | Numbers which have upper and lower bounds |
| CheckEqual | Something that can be checked for equality and printed out to a debug channel if bad. |
| Checkable | A "checkable" piece of information, used by the standard Substrate Executive in order to
check the validity of a piece of extrinsic information, usually by verifying the signature.
Implement for pieces of information that require some additional context |
| CheckedAdd | Performs addition that returns |
| CheckedConversion | Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
|
| CheckedDiv | Performs division that returns |
| CheckedMul | Performs multiplication that returns |
| CheckedShl | Performs a left shift that returns |
| CheckedShr | Performs a right shift that returns |
| CheckedSub | Performs subtraction that returns |
| Clear | Trait for things that can be clear (have no bits set). For numeric types, essentially the same
as |
| Convert | Extensible conversion trait. Generic over both source and destination types. |
| Dispatchable | A lazy call (module function and argument values) that can be executed via its |
| EnsureOrigin | Some sort of check on the origin is performed by this object. |
| Extrinsic | Something that acts like an |
| GetNodeBlockType | A marker trait for something that knows the type of the node block. |
| GetRuntimeBlockType | A marker trait for something that knows the type of the runtime block. |
| Hash | Abstraction around hashing |
| Header | Something which fulfills the abstract idea of a Substrate header. It has types for a |
| IdentifyAccount | Some type that is able to be collapsed into an account ID. It is not possible to recreate the original value from the account ID. |
| IntegerSquareRoot | A trait implementing integer square root. |
| IsMember | Determine if a |
| Lazy | A lazy value. |
| Lookup | Means of changing one type into another in a manner dependent on the source type. |
| MaybeDisplay | A type that implements Display when in std environment. |
| MaybeHash | A type that implements Hash when in std environment. |
| MaybeSerialize | A type that implements Serialize when in std environment. |
| MaybeSerializeDeserialize | A type that implements Serialize, DeserializeOwned and Debug when in std environment. |
| Member | A type that can be used in runtime structures. |
| OffchainWorker | Off-chain computation trait. |
| OnFinalize | The block finalization trait. Implementing this lets you express what should happen for your module when the block is ending. |
| OnInitialize | The block initialization trait. Implementing this lets you express what should happen for your module when the block is beginning (right before the first extrinsic is executed). |
| One | Defines a multiplicative identity element for |
| OpaqueKeys | Opaque datatype that may be destructured into a series of raw byte slices (which represent individual keys). |
| Printable | Trait for things which can be printed from the runtime. |
| ProvideRuntimeApi | Something that provides a runtime api. |
| RandomnessBeacon | A type that provides a randomness beacon. |
| RuntimeApiInfo | Something that provides information about a runtime api. |
| SaturatedConversion | Convenience type to work around the highly unergonomic syntax needed
to invoke the functions of overloaded generic traits, in this case
|
| Saturating | Simple trait to use checked mul and max value to give a saturated mul operation over supported types. |
| Scale | Multiply and divide by a number that isn't necessarily the same type. Basically just the same
as |
| SignedExtension | Means by which a transaction may be extended. This type embodies both the data and the logic that should be additionally associated with the transaction. It should be plain old data. |
| SimpleArithmetic | A meta trait for arithmetic. |
| SimpleBitOps | A meta trait for all bit ops. |
| StaticLookup | Means of changing one type into another in a manner dependent on the source type.
This variant is different to |
| UniqueSaturatedFrom | Just like |
| UniqueSaturatedInto | Just like |
| ValidateUnsigned | Deprecated Something that can validate unsigned extrinsics for the transaction pool. |
| Verify | Means of signature verification. |
| Zero | Defines an additive identity element for |
Type Definitions
| DigestFor | Extract the digest type for a block. |
| DigestItemFor | Extract the digest item type for a block. |
| HashFor | Extract the hashing type for a block. |
| NumberFor | Extract the number type for a block. |