Trait wildland_cargo_lib::ffi::LocalSecureStorage
source · [−]pub trait LocalSecureStorage {
fn insert(
&self,
key: String,
value: Vec<u8, Global>
) -> Result<Option<Vec<u8, Global>>, LssError>;
fn get(&self, key: String) -> Result<Option<Vec<u8, Global>>, LssError>;
fn contains_key(&self, key: String) -> Result<bool, LssError>;
fn keys(&self) -> Result<Vec<String, Global>, LssError>;
fn remove(&self, key: String) -> Result<Option<Vec<u8, Global>>, LssError>;
fn len(&self) -> Result<usize, LssError>;
fn is_empty(&self) -> Result<bool, LssError>;
}
Required Methods
sourcefn insert(
&self,
key: String,
value: Vec<u8, Global>
) -> Result<Option<Vec<u8, Global>>, LssError>
fn insert(
&self,
key: String,
value: Vec<u8, Global>
) -> Result<Option<Vec<u8, Global>>, LssError>
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) -> Result<Option<Vec<u8, Global>>, LssError>
fn get(&self, key: String) -> Result<Option<Vec<u8, Global>>, LssError>
Returns a copy of the value corresponding to the key.
sourcefn contains_key(&self, key: String) -> Result<bool, LssError>
fn contains_key(&self, key: String) -> Result<bool, LssError>
Returns true if the map contains a value for the specified key.