pub trait StorageValue {
type VALUE: Decode;
const PALLET_NAME: &'static str;
const STORAGE_NAME: &'static str;
// Provided methods
fn encode_storage_key() -> [u8; 32] { ... }
fn hex_encode_storage_key() -> String { ... }
fn decode_hex_storage_value(value: &str) -> Result<Self::VALUE, Error> { ... }
fn decode_storage_value(value: &mut &[u8]) -> Result<Self::VALUE, Error> { ... }
fn fetch(
client: &RpcClient,
at: Option<H256>,
) -> impl Future<Output = Result<Option<Self::VALUE>, Error>> { ... }
}Required Associated Constants§
const PALLET_NAME: &'static str
const STORAGE_NAME: &'static str
Required Associated Types§
Provided Methods§
fn encode_storage_key() -> [u8; 32]
fn hex_encode_storage_key() -> String
Sourcefn decode_hex_storage_value(value: &str) -> Result<Self::VALUE, Error>
fn decode_hex_storage_value(value: &str) -> Result<Self::VALUE, Error>
Decodes the Hex and SCALE encoded Storage Value This is equal to Hex::decode + Self::decode
If you need to decode bytes call decode
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".