zink::storage::value

Trait Storage

Source
pub trait Storage {
    type Value: StorageValue + Asm;

    const STORAGE_KEY: [u8; 32];
    const STORAGE_SLOT: i32;

    // Provided methods
    fn get() -> Self::Value { ... }
    fn set(value: Self::Value) { ... }
}
Expand description

Storage trait. Currently not for public use

Required Associated Constants§

Required Associated Types§

Provided Methods§

Source

fn get() -> Self::Value

Get value from storage.

Source

fn set(value: Self::Value)

Set value to storage.

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.

Implementors§