1#![cfg_attr(docsrs, feature(doc_auto_cfg))]
9#![warn(missing_docs)]
11#![allow(clippy::needless_question_mark)] #![allow(clippy::manual_range_contains)] #![allow(clippy::needless_borrows_for_generic_args)] #![no_std]
16
17#[cfg(target_pointer_width = "16")]
19compile_error!(
20 "rust-bitcoin currently only supports architectures with pointers wider than 16 bits, let us
21 know if you want 16-bit support. Note that we do NOT guarantee that we will implement it!"
22);
23
24#[cfg(feature = "alloc")]
25extern crate alloc;
26
27#[cfg(feature = "std")]
28extern crate std;
29
30#[cfg(feature = "serde")]
32pub extern crate serde;
33
34pub mod amount;
35#[cfg(feature = "alloc")]
36pub mod fee_rate;
37#[cfg(feature = "alloc")]
38pub mod locktime;
39#[cfg(feature = "alloc")]
40pub mod parse;
41#[cfg(feature = "alloc")]
42pub mod weight;
43
44pub use self::amount::ParseAmountError;
45#[doc(inline)]
46pub use self::amount::{Amount, SignedAmount};
47#[cfg(feature = "alloc")]
48pub use self::parse::ParseIntError;
49#[cfg(feature = "alloc")]
50#[doc(inline)]
51pub use self::{fee_rate::FeeRate, weight::Weight};
52
53#[rustfmt::skip]
54#[allow(unused_imports)]
55mod prelude {
56 #[cfg(all(feature = "alloc", not(feature = "std")))]
57 pub use alloc::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, slice, rc};
58
59 #[cfg(feature = "std")]
60 pub use std::{string::{String, ToString}, vec::Vec, boxed::Box, borrow::{Borrow, BorrowMut, Cow, ToOwned}, rc};
61}