Improve the README, add examples

This commit is contained in:
Alekos Filini
2020-09-07 11:16:41 +02:00
parent 6a2d0db674
commit c4f4f20d8b
6 changed files with 484 additions and 4 deletions

3
src/doctest.rs Normal file
View File

@@ -0,0 +1,3 @@
#[doc(include = "../README.md")]
#[cfg(doctest)]
pub struct ReadmeDoctests;

View File

@@ -25,6 +25,9 @@
// only enables the `doc_cfg` feature when
// the `docsrs` configuration attribute is defined
#![cfg_attr(docsrs, feature(doc_cfg))]
// only enables the nightly `external_doc` feature when
// `test-md-docs` is enabled
#![cfg_attr(feature = "test-md-docs", feature(external_doc))]
pub extern crate bitcoin;
extern crate log;
@@ -70,6 +73,8 @@ pub(crate) mod error;
pub mod blockchain;
pub mod database;
pub mod descriptor;
#[cfg(feature = "test-md-docs")]
mod doctest;
pub(crate) mod psbt;
pub(crate) mod types;
pub mod wallet;