From: Riccardo Casatta Date: Fri, 4 Dec 2020 15:20:56 +0000 (+0100) Subject: [docs] database/any.rs X-Git-Tag: v0.2.0~35^2 X-Git-Url: http://internal-gitweb-vhost/%22https:/parse/scripts/database/-script/-debug/struct.ScriptPath.html?a=commitdiff_plain;h=46092a200a7ba7800e0d8718590dfb4f5d26fbc8;p=bdk [docs] database/any.rs --- diff --git a/src/database/any.rs b/src/database/any.rs index 6f9339d0..d77a1f1b 100644 --- a/src/database/any.rs +++ b/src/database/any.rs @@ -89,9 +89,11 @@ macro_rules! impl_inner_method { /// See [this module](crate::database::any)'s documentation for a usage example. #[derive(Debug)] pub enum AnyDatabase { + #[allow(missing_docs)] Memory(memory::MemoryDatabase), #[cfg(feature = "key-value-db")] #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))] + #[allow(missing_docs)] Sled(sled::Tree), } @@ -100,9 +102,11 @@ impl_from!(sled::Tree, AnyDatabase, Sled, #[cfg(feature = "key-value-db")]); /// Type that contains any of the [`BatchDatabase::Batch`] types defined by the library pub enum AnyBatch { + #[allow(missing_docs)] Memory(::Batch), #[cfg(feature = "key-value-db")] #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))] + #[allow(missing_docs)] Sled(::Batch), } @@ -347,7 +351,9 @@ impl BatchDatabase for AnyDatabase { #[cfg(feature = "key-value-db")] #[derive(Debug, serde::Serialize, serde::Deserialize)] pub struct SledDbConfiguration { + /// Main directory of the db pub path: String, + /// Name of the database tree, a separated namespace for the data pub tree_name: String, } @@ -367,9 +373,11 @@ impl ConfigurableDatabase for sled::Tree { /// will find this particularly useful. #[derive(Debug, serde::Serialize, serde::Deserialize)] pub enum AnyDatabaseConfig { + /// Memory database has no config Memory(()), #[cfg(feature = "key-value-db")] #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))] + #[allow(missing_docs)] Sled(SledDbConfiguration), }