Trait StorageOps

Source
pub trait StorageOps<T> {
    // Required methods
    fn get(&self, env: &Env) -> Option<T>;
    fn set(&self, env: &Env, data: &T);
    fn remove(&self, env: &Env);
    fn has(&self, env: &Env) -> bool;
    fn extend_ttl(&self, env: &Env, threshold: u32, extend_to: u32);
}
Expand description

Trait for storage operations.

Required Methods§

Source

fn get(&self, env: &Env) -> Option<T>

Source

fn set(&self, env: &Env, data: &T)

Source

fn remove(&self, env: &Env)

Source

fn has(&self, env: &Env) -> bool

Source

fn extend_ttl(&self, env: &Env, threshold: u32, extend_to: u32)

Implementors§