Expand description
This module contains types and functions for working with View Functions.
- See
RUNTIME_API_NAMEandencode_view_function_inputsto obtain the Runtime API name and the encoded input data required to call a given View Function. - See
decode_view_function_responseto decode View Function responses. - See
ViewFunctionTypeInfofor the underlying trait which extracts the relevant information. - See
ViewFunctionEntryInfofor a underlying trait which provides information about the available View Functions.
Structs§
- View
Function Info - Information about a View Function.
- View
Function Input - Information about a specific input value to a View Function.
Enums§
- View
Function Decode Error - An error returned trying to decode a View Function responses.
- View
Function Info Error - An error returned trying to access View Function type information.
- View
Function Inputs Encode Error - An error returned trying to encode View Function inputs.
Constants§
- RUNTIME_
API_ NAME - The default name of the Runtime API that you must call to query a View Function, where
the arguments to this Runtime API can be encoded using
encode_view_function_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. - View
Function Entry Info - This can be implemented for anything capable of providing information about the available View Functions
- View
Function Type Info - This is implemented for anything capable of providing information about view functions (primarily metadata V16 and onwards).
Functions§
- decode_
view_ function_ response - Decode a View Function response.
- decode_
view_ function_ response_ with_ info - Decode a View Function response.
- encode_
view_ function_ inputs - Encode the Runtime API input data necessary to call a View Function.
- encode_
view_ function_ inputs_ to - Encode to a provided output Vec the Runtime API input data necessary to call a View Function.
- encode_
view_ function_ inputs_ with_ info_ to - Encode to a provided output Vec the Runtime API input data necessary to call a View Function.
Type Aliases§
- View
Function Entry - An entry denoting a pallet or a View Function name.