]> Untitled Git - bdk/commitdiff
[docs] Replace all 'allow(missing_docs)' with basic docs
authorSteve Myers <steve@notmandatory.org>
Wed, 16 Dec 2020 21:57:01 +0000 (13:57 -0800)
committerSteve Myers <steve@notmandatory.org>
Wed, 16 Dec 2020 23:12:49 +0000 (15:12 -0800)
src/blockchain/any.rs
src/database/any.rs
src/error.rs
src/keys/mod.rs

index 2ddb77681a682865fbc54349770e0671f0d04505..04d6df04bb18dc8e0942953e7ce3283742c009b3 100644 (file)
@@ -113,15 +113,15 @@ macro_rules! impl_inner_method {
 pub enum AnyBlockchain {
     #[cfg(feature = "electrum")]
     #[cfg_attr(docsrs, doc(cfg(feature = "electrum")))]
-    #[allow(missing_docs)]
+    /// Electrum client
     Electrum(electrum::ElectrumBlockchain),
     #[cfg(feature = "esplora")]
     #[cfg_attr(docsrs, doc(cfg(feature = "esplora")))]
-    #[allow(missing_docs)]
+    /// Esplora client
     Esplora(esplora::EsploraBlockchain),
     #[cfg(feature = "compact_filters")]
     #[cfg_attr(docsrs, doc(cfg(feature = "compact_filters")))]
-    #[allow(missing_docs)]
+    /// Compact filters client
     CompactFilters(compact_filters::CompactFiltersBlockchain),
 }
 
@@ -188,15 +188,15 @@ impl_from!(compact_filters::CompactFiltersBlockchain, AnyBlockchain, CompactFilt
 pub enum AnyBlockchainConfig {
     #[cfg(feature = "electrum")]
     #[cfg_attr(docsrs, doc(cfg(feature = "electrum")))]
-    #[allow(missing_docs)]
+    /// Electrum client
     Electrum(electrum::ElectrumBlockchainConfig),
     #[cfg(feature = "esplora")]
     #[cfg_attr(docsrs, doc(cfg(feature = "esplora")))]
-    #[allow(missing_docs)]
+    /// Esplora client
     Esplora(esplora::EsploraBlockchainConfig),
     #[cfg(feature = "compact_filters")]
     #[cfg_attr(docsrs, doc(cfg(feature = "compact_filters")))]
-    #[allow(missing_docs)]
+    /// Compact filters client
     CompactFilters(compact_filters::CompactFiltersBlockchainConfig),
 }
 
index 78b01a3b3afe5d547849ba2956f2bba6292d5fa6..067ae7bbc9f71a9701ef07d5314dc7bb8923fe3c 100644 (file)
@@ -89,11 +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)]
+    /// In-memory ephemeral database
     Memory(memory::MemoryDatabase),
     #[cfg(feature = "key-value-db")]
     #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))]
-    #[allow(missing_docs)]
+    /// Simple key-value embedded database based on [`sled`]
     Sled(sled::Tree),
 }
 
@@ -102,11 +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)]
+    /// In-memory ephemeral database
     Memory(<memory::MemoryDatabase as BatchDatabase>::Batch),
     #[cfg(feature = "key-value-db")]
     #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))]
-    #[allow(missing_docs)]
+    /// Simple key-value embedded database based on [`sled`]
     Sled(<sled::Tree as BatchDatabase>::Batch),
 }
 
@@ -364,7 +364,7 @@ pub enum AnyDatabaseConfig {
     Memory(()),
     #[cfg(feature = "key-value-db")]
     #[cfg_attr(docsrs, doc(cfg(feature = "key-value-db")))]
-    #[allow(missing_docs)]
+    /// Simple key-value embedded database based on [`sled`]
     Sled(SledDbConfiguration),
 }
 
index dea1cfbf46390f9ef050934bf28b1e59e7b2b392..8f137f1fc32ad86763e4a0edef84d0d77e61c3fc 100644 (file)
@@ -78,15 +78,15 @@ pub enum Error {
     ///
     /// [`TxBuilder::add_global_xpubs`]: crate::wallet::tx_builder::TxBuilder::add_global_xpubs
     MissingKeyOrigin(String),
-    #[allow(missing_docs)]
+    /// Error while working with [`keys`](crate::keys)
     Key(crate::keys::KeyError),
     /// Descriptor checksum mismatch
     ChecksumMismatch,
     /// Spending policy is not compatible with this [`KeychainKind`](crate::types::KeychainKind)
     SpendingPolicyRequired(crate::types::KeychainKind),
-    #[allow(missing_docs)]
+    /// Error while extracting and manipulating policies
     InvalidPolicyPathError(crate::descriptor::policy::PolicyError),
-    #[allow(missing_docs)]
+    /// Signing error
     Signer(crate::wallet::signer::SignerError),
 
     // Blockchain interface errors
@@ -101,23 +101,23 @@ pub enum Error {
     /// Requested outpoint doesn't exist in the tx (vout greater than available outputs)
     InvalidOutpoint(OutPoint),
 
-    #[allow(missing_docs)]
+    /// Error related to the parsing and usage of descriptors
     Descriptor(crate::descriptor::error::Error),
-    #[allow(missing_docs)]
+    /// Error that can be returned to fail the validation of an address
     AddressValidator(crate::wallet::address_validator::AddressValidatorError),
-    #[allow(missing_docs)]
+    /// Encoding error
     Encode(bitcoin::consensus::encode::Error),
-    #[allow(missing_docs)]
+    /// Miniscript error
     Miniscript(miniscript::Error),
-    #[allow(missing_docs)]
+    /// BIP32 error
     BIP32(bitcoin::util::bip32::Error),
-    #[allow(missing_docs)]
+    /// An ECDSA error
     Secp256k1(bitcoin::secp256k1::Error),
-    #[allow(missing_docs)]
+    /// Error serializing or deserializing JSON data
     JSON(serde_json::Error),
-    #[allow(missing_docs)]
+    /// Hex decoding error
     Hex(bitcoin::hashes::hex::Error),
-    #[allow(missing_docs)]
+    /// Partially signed bitcoin transaction error
     PSBT(bitcoin::util::psbt::Error),
 
     //KeyMismatch(bitcoin::secp256k1::PublicKey, bitcoin::secp256k1::PublicKey),
@@ -128,16 +128,16 @@ pub enum Error {
     //Uncapable(crate::blockchain::Capability),
     //MissingCachedAddresses,
     #[cfg(feature = "electrum")]
-    #[allow(missing_docs)]
+    /// Electrum client error
     Electrum(electrum_client::Error),
     #[cfg(feature = "esplora")]
-    #[allow(missing_docs)]
+    /// Esplora client error
     Esplora(crate::blockchain::esplora::EsploraError),
-    #[allow(missing_docs)]
     #[cfg(feature = "compact_filters")]
+    /// Compact filters client error)
     CompactFilters(crate::blockchain::compact_filters::CompactFiltersError),
     #[cfg(feature = "key-value-db")]
-    #[allow(missing_docs)]
+    /// Sled database error
     Sled(sled::Error),
 }
 
index 807bbe641f2bbc1668f13d01b80ac795e9d0a1a4..49d7c0af8f5253a07556bfbb5f9d8dcc3482f8d7 100644 (file)
@@ -684,9 +684,9 @@ pub enum KeyError {
     /// Custom error message
     Message(String),
 
-    #[allow(missing_docs)]
+    /// BIP32 error
     BIP32(bitcoin::util::bip32::Error),
-    #[allow(missing_docs)]
+    /// Miniscript error
     Miniscript(miniscript::Error),
 }