Expand description
A Metadata type, which is used through this crate.
This can be decoded from the bytes handed back from a node when asking for metadata.
§Examples
use subxt_core::metadata;
// We need to fetch the bytes from somewhere, and then we can decode them:
let metadata_bytes = include_bytes!("../../../artifacts/polkadot_metadata_small.scale");
let metadata = metadata::decode_from(&metadata_bytes[..]).unwrap();Structs§
- Metadata
- A cheaply clone-able representation of the runtime metadata received from a node.
Traits§
- Decode
With Metadata - This trait is implemented for all types that also implement
scale_decode::DecodeAsType. - Encode
With Metadata - This trait is implemented for all types that also implement
scale_encode::EncodeAsType.
Functions§
- decode_
from - Attempt to decode some bytes into
Metadata, returning an error if decoding fails.