Trait substreams::store::StoreSetIfNotExists

source ·
pub trait StoreSetIfNotExists<V>: StoreDelete + StoreNew {
    // Required methods
    fn set_if_not_exists<K: AsRef<str>>(&self, ord: u64, key: K, value: &V);
    fn set_if_not_exists_many<K: AsRef<str>>(
        &self,
        ord: u64,
        keys: &Vec<K>,
        value: &V,
    );
}
Expand description

StoreSetIfNotExists is a trait which is implemented on any type of typed StoreSetIfNotExists

Required Methods§

source

fn set_if_not_exists<K: AsRef<str>>(&self, ord: u64, key: K, value: &V)

Set a given key to a given value, if the key existed before, it will be ignored and not set.

source

fn set_if_not_exists_many<K: AsRef<str>>( &self, ord: u64, keys: &Vec<K>, value: &V, )

Set given keys to given values, if the key existed before, it will be ignored and not set.

Object Safety§

This trait is not object safe.

Implementors§