The IOTA SDK provides developers with a seamless experience to develop on IOTA by providing account abstractions and clients to interact with node APIs.
// Copyright 2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
//! Database provider interfaces and implementations.
#[cfg(feature ="stronghold")]#[cfg_attr(docsrs,doc(cfg(feature ="stronghold")))]modstronghold;useasync_trait::async_trait;#[cfg(feature ="stronghold")]pubuseself::stronghold::StrongholdStorageProvider;usecrate::client::Result;/// The interface for database providers.
#[async_trait]pubtraitStorageProvider{/// Get a value out of the database.
async fnget(&mutself, k:&[u8])->Result<Option<Vec<u8>>>;/// Insert a value into the database.
////// If there exists a record under the same key as `k`, it will be replaced by the new value (`v`) and returned.
async fninsert(&mutself, k:&[u8], v:&[u8])->Result<Option<Vec<u8>>>;/// Delete a value from the database.
////// The deleted value is returned.
async fndelete(&mutself, k:&[u8])->Result<Option<Vec<u8>>>;}