pub trait TransientMapping {
type Key: Asm;
type Value: TransientStorageValue;
const STORAGE_SLOT: i32;
// Required method
fn storage_key(key: Self::Key) -> [u8; 32];
// Provided methods
fn get(key: Self::Key) -> Self::Value { ... }
fn set(key: Self::Key, value: Self::Value) { ... }
}
Expand description
Transient storage mapping interface
Required Associated Constants§
const STORAGE_SLOT: i32
Required Associated Types§
Required Methods§
fn storage_key(key: Self::Key) -> [u8; 32]
Provided Methods§
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.