]> Untitled Git - bdk/commitdiff
[docs] database/any.rs
authorRiccardo Casatta <riccardo@casatta.it>
Fri, 4 Dec 2020 15:20:56 +0000 (16:20 +0100)
committerRiccardo Casatta <riccardo@casatta.it>
Sat, 5 Dec 2020 12:26:00 +0000 (13:26 +0100)
src/database/any.rs

index 6f9339d004b5dff8fbafe4ad087c7201788108fe..d77a1f1b18d2c9b0b678f12f63ffc025b6118601 100644 (file)
@@ -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(<memory::MemoryDatabase as BatchDatabase>::Batch),
     #[cfg(feature = "key-value-db")]
     #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))]
+    #[allow(missing_docs)]
     Sled(<sled::Tree as BatchDatabase>::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),
 }