[docs] Add docs to the 'descriptor' module

This commit is contained in:
Steve Myers
2020-12-13 20:36:38 -08:00
parent 4e771d6546
commit 0f2dc05c08
3 changed files with 10 additions and 11 deletions

View File

@@ -45,7 +45,6 @@ pub mod checksum;
mod dsl;
pub mod error;
pub mod policy;
#[allow(missing_docs)] // TODO add missing docs and remove this allow
pub mod template;
pub use self::checksum::get_checksum;
@@ -65,9 +64,9 @@ pub type ExtendedDescriptor = Descriptor<DescriptorPublicKey>;
/// [`psbt::Output`]: bitcoin::util::psbt::Output
pub type HDKeyPaths = BTreeMap<PublicKey, (Fingerprint, DerivationPath)>;
#[allow(missing_docs)] // TODO add missing docs and remove this allow
/// Trait for types which can be converted into an [`ExtendedDescriptor`] and a [`KeyMap`] usable by a wallet in a specific [`Network`]
pub trait ToWalletDescriptor {
/// Convert to wallet descriptor
fn to_wallet_descriptor(
self,
network: Network,
@@ -187,9 +186,9 @@ impl ToWalletDescriptor for (ExtendedDescriptor, KeyMap, ValidNetworks) {
}
}
#[allow(missing_docs)] // TODO add missing docs and remove this allow
/// Trait implemented on [`Descriptor`]s to add a method to extract the spending [`policy`]
pub trait ExtractPolicy {
/// Extract the spending [`policy`]
fn extract_policy(
&self,
signers: &SignersContainer,