Trait wildland_corex::LocalSecureStorage
source · [−]pub trait LocalSecureStorage {
fn insert(&self, key: String, value: Vec<u8>) -> LssResult<Option<Vec<u8>>>;
fn get(&self, key: String) -> LssResult<Option<Vec<u8>>>;
fn contains_key(&self, key: String) -> LssResult<bool>;
fn keys(&self) -> LssResult<Vec<String>>;
fn remove(&self, key: String) -> LssResult<Option<Vec<u8>>>;
fn len(&self) -> LssResult<usize>;
fn is_empty(&self) -> LssResult<bool>;
}
Required Methods
sourcefn insert(&self, key: String, value: Vec<u8>) -> LssResult<Option<Vec<u8>>>
fn insert(&self, key: String, value: Vec<u8>) -> LssResult<Option<Vec<u8>>>
Inserts a key-value pair into the LSS. If the map did not have this key present, None is returned. If the map did have this key present, the value is updated, and the old value is returned.
sourcefn get(&self, key: String) -> LssResult<Option<Vec<u8>>>
fn get(&self, key: String) -> LssResult<Option<Vec<u8>>>
Returns a copy of the value corresponding to the key.
sourcefn contains_key(&self, key: String) -> LssResult<bool>
fn contains_key(&self, key: String) -> LssResult<bool>
Returns true if the map contains a value for the specified key.