Enum bdk_debug::database::any::AnyDatabaseConfig
source · pub enum AnyDatabaseConfig {
Memory(()),
Sled(SledDbConfiguration),
Sqlite(SqliteDbConfiguration),
}Expand description
Type that can contain any of the database configurations defined by the library
This allows storing a single configuration that can be loaded into an AnyDatabase
instance. Wallets that plan to offer users the ability to switch blockchain backend at runtime
will find this particularly useful.
Variants§
Memory(())
Memory database has no config
Sled(SledDbConfiguration)
Available on crate feature
key-value-db only.Simple key-value embedded database based on sled
Sqlite(SqliteDbConfiguration)
Available on crate feature
sqlite only.Sqlite embedded database using rusqlite
Trait Implementations§
source§impl Debug for AnyDatabaseConfig
impl Debug for AnyDatabaseConfig
source§impl<'de> Deserialize<'de> for AnyDatabaseConfig
impl<'de> Deserialize<'de> for AnyDatabaseConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<()> for AnyDatabaseConfig
impl From<()> for AnyDatabaseConfig
source§impl From<SledDbConfiguration> for AnyDatabaseConfig
impl From<SledDbConfiguration> for AnyDatabaseConfig
source§fn from(inner: SledDbConfiguration) -> Self
fn from(inner: SledDbConfiguration) -> Self
Converts to this type from the input type.
source§impl From<SqliteDbConfiguration> for AnyDatabaseConfig
impl From<SqliteDbConfiguration> for AnyDatabaseConfig
source§fn from(inner: SqliteDbConfiguration) -> Self
fn from(inner: SqliteDbConfiguration) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for AnyDatabaseConfig
impl Send for AnyDatabaseConfig
impl Sync for AnyDatabaseConfig
impl Unpin for AnyDatabaseConfig
impl UnwindSafe for AnyDatabaseConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more