wacc 2.0.0

Web Assembly Cryptographic Constructs VM implementation
1
2
3
4
5
6
7
8
9
10
11
12
// SPDX-License-Identifier: Apache-2.0
use crate::Value;

/// Trait to a key-value storage mechanism
pub trait Pairs {
    /// get a value associated with the key
    fn get(&self, key: &str) -> Option<Value>;

    /// add a key-value pair to the storage, returns the previous value if the
    /// key already exists in the data structure
    fn put(&mut self, key: &str, value: &Value) -> Option<Value>;
}