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
sourceimpl Debug for AnyDatabaseConfig
impl Debug for AnyDatabaseConfig
sourceimpl<'de> Deserialize<'de> for AnyDatabaseConfig
impl<'de> Deserialize<'de> for AnyDatabaseConfig
sourcefn 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
sourceimpl From<()> for AnyDatabaseConfig
impl From<()> for AnyDatabaseConfig
sourceimpl From<SledDbConfiguration> for AnyDatabaseConfig
impl From<SledDbConfiguration> for AnyDatabaseConfig
sourcefn from(inner: SledDbConfiguration) -> Self
fn from(inner: SledDbConfiguration) -> Self
Converts to this type from the input type.
sourceimpl From<SqliteDbConfiguration> for AnyDatabaseConfig
impl From<SqliteDbConfiguration> for AnyDatabaseConfig
sourcefn from(inner: SqliteDbConfiguration) -> Self
fn from(inner: SqliteDbConfiguration) -> Self
Converts to this type from the input type.
sourceimpl Serialize for AnyDatabaseConfig
impl Serialize for AnyDatabaseConfig
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more