pub trait StorageValue {
type VALUE: Decode;
const PALLET_NAME: &str;
const STORAGE_NAME: &str;
// Provided methods
fn encode_storage_key() -> [u8; 32] { ... }
fn hex_encode_storage_key() -> String { ... }
fn decode(value: &mut &[u8]) -> Result<Self::VALUE, Error> { ... }
}
Required Associated Constants§
const PALLET_NAME: &str
const STORAGE_NAME: &str
Required Associated Types§
Provided Methods§
fn encode_storage_key() -> [u8; 32]
fn hex_encode_storage_key() -> String
fn decode(value: &mut &[u8]) -> Result<Self::VALUE, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.