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

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.

Returns a copy of the value corresponding to the key.

Returns true if the map contains a value for the specified key.

Returns all keys in arbitrary order.

Removes a key from the map, returning the value at the key if the key was previously in the map.

Returns the number of elements in the map.

Returns true if the map contains no elements, false otherwise.

Implementors