[][src]Module magical::database

Database types

This module provides the implementation of some defaults database types, along with traits that can be implemented externally to let Wallets use customized databases.

It's important to note that the databases defined here only contains "blockchain-related" data. They can be seen more as a cache than a critical piece of storage that contains secrets and keys.

The currently recommended database is [sled], which is a pretty simple key-value embedded database written in Rust. If the key-value-db feature is enabled (which by default is), this library automatically implements all the required traits for [sled::Tree].

Re-exports

pub use memory::MemoryDatabase;

Modules

memory

In-memory ephemeral database

Traits

BatchDatabase

Trait for a database that supports batch operations

BatchOperations

Trait for operations that can be batched

Database

Trait for reading data from a database