Expand description
This module contains types and functions for working with Runtime APIs.
- See
encode_runtime_api_nameandencode_runtime_api_inputsto encode the name and inputs to make a Runtime API call. - See
decode_runtime_api_responseto decode Runtime API responses. - See
RuntimeApiTypeInfofor the underlying trait which extracts the relevant information. - See
RuntimeApiEntryInfofor a underlying trait which provides information about the available Runtime APIs.
Structs§
- Runtime
ApiInfo - Information about a Runtime API.
- Runtime
ApiInput - Information about a specific input value to a Runtime API.
Enums§
- Runtime
ApiDecode Error - An error returned trying to decode a Runtime API responses.
- Runtime
ApiInfo Error - An error returned trying to access Runtime API type information.
- Runtime
ApiInputs Encode Error - An error returned trying to encode Runtime API inputs.
Traits§
- Encodable
Values - Since
scale_encode::EncodeAsTypeis not dyn safe, this trait is used to iterate through and encode a set of values. - Into
Encodable Values - This can be implemented for anything that can be encoded in multiple steps into a set of values
via
scale_encode::EncodeAsType. The common use case is to encode a tuple of multiple types, step by step, into bytes. As well as tuples up to size 12, Implementations also exist for Vecs and arrays. - Runtime
ApiEntry Info - This can be implemented for anything capable of providing information about the available Runtime Apis
- Runtime
ApiType Info - This can be implemented for anything capable of providing Runtime API type information. It is implemented for newer versions of frame-metadata (V15 and above).
Functions§
- decode_
runtime_ api_ response - Decode a runtime API response.
- decode_
runtime_ api_ response_ with_ info - Decode a runtime API response.
- encode_
runtime_ api_ inputs - Encode the inputs to a Runtime API.
- encode_
runtime_ api_ inputs_ to - Encode the inputs to a Runtime API to a provided output
Vec. - encode_
runtime_ api_ inputs_ with_ info_ to - Encode the inputs to a Runtime API to a provided output
Vec. - encode_
runtime_ api_ name - Encode the name/ID of a Runtime API used in RPC methods given the trait name and method name.
Type Aliases§
- Runtime
ApiEntry - An entry denoting a Runtime API trait or method.