compound_key_value_storage

Macro compound_key_value_storage 

Source
macro_rules! compound_key_value_storage {
    ($name:ident, $dict:expr, $k1_type:ty, $k2_type:ty, $value_type:ty) => { ... };
    ($name:ident, $dict:expr, $k1_type:ty, $value_type:ty) => { ... };
}
Expand description

Creates an Odra module that stores a values in a given dictionary.

The module has three methods: set, get and init. The key1 and key2 arguments of set and get are converted to bytes, combined into a single bytes vector, and finally hex-encoded and then used as a dictionary key. The init method initializes the dictionary with the given name.