units: Improve re-exports
Make an attempt to improve the ergonomics and docs clarity of the `units` crate. - Don't inline error type re-exports, this keeps them up in the "Re-exports" section and saves cluttering the other inlined docs. - Re-export and inline the docs for `FeeRate` and `Weight` same as we do for `Amount`. This makes the "Structs" section of the docs nice except for the exclusion of the locktime types (which cannot be helped).
This commit is contained in:
parent
6ec93ce685
commit
36ef4a62cf
|
@ -46,9 +46,16 @@ pub mod parse;
|
||||||
pub mod weight;
|
pub mod weight;
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use self::amount::{Amount, ParseAmountError, SignedAmount};
|
pub use self::amount::{Amount, SignedAmount};
|
||||||
|
pub use self::amount::ParseAmountError;
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
pub use self::parse::ParseIntError;
|
pub use self::parse::ParseIntError;
|
||||||
|
#[cfg(feature = "alloc")]
|
||||||
|
#[doc(inline)]
|
||||||
|
pub use self::{
|
||||||
|
fee_rate::FeeRate,
|
||||||
|
weight::Weight,
|
||||||
|
};
|
||||||
|
|
||||||
#[rustfmt::skip]
|
#[rustfmt::skip]
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
|
|
Loading…
Reference in New Issue