Skip to main content

SecureStore

Trait SecureStore 

Source
pub trait SecureStore:
    Send
    + Sync
    + 'static {
    // Provided methods
    fn read(&self, key: &str) -> Result<Option<Vec<u8>>, PlatformError> { ... }
    fn contains(&self, key: &str) -> Result<bool, PlatformError> { ... }
    fn write(&self, key: &str, value: &[u8]) -> Result<(), PlatformError> { ... }
    fn delete(&self, key: &str) -> Result<(), PlatformError> { ... }
}

Provided Methods§

Source

fn read(&self, key: &str) -> Result<Option<Vec<u8>>, PlatformError>

Read a persisted value from a secure, app-scoped store that survives reinstall where supported.

Source

fn contains(&self, key: &str) -> Result<bool, PlatformError>

Check whether a value exists in the secure store.

Source

fn write(&self, key: &str, value: &[u8]) -> Result<(), PlatformError>

Persist a value into the secure store.

Source

fn delete(&self, key: &str) -> Result<(), PlatformError>

Delete a value from the secure store.

Implementors§