Add an fn to get a ChannelMonitor reference from a ManyChannelMonitor
[rust-lightning] / lightning / src / lib.rs
1 #![crate_name = "lightning"]
2
3 //! Rust-Lightning, not Rusty's Lightning!
4 //!
5 //! A full-featured but also flexible lightning implementation, in library form. This allows the
6 //! user (you) to decide how they wish to use it instead of being a fully self-contained daemon.
7 //! This means there is no built-in threading/execution environment and it's up to the user to
8 //! figure out how best to make networking happen/timers fire/things get written to disk/keys get
9 //! generated/etc. This makes it a good candidate for tight integration into an existing wallet
10 //! instead of having a rather-separate lightning appendage to a wallet.
11
12 #![cfg_attr(not(feature = "fuzztarget"), deny(missing_docs))]
13
14 // In general, rust is absolutely horrid at supporting users doing things like,
15 // for example, compiling Rust code for real environments. Disable useless lints
16 // that don't do anything but annoy us and cant actually ever be resolved.
17 #![allow(bare_trait_objects)]
18 #![allow(ellipsis_inclusive_range_patterns)]
19
20 extern crate bitcoin;
21 #[cfg(test)] extern crate rand;
22 #[cfg(test)] extern crate hex;
23 #[cfg(all(test, feature = "mutation_testing"))] extern crate mutagen;
24
25 #[macro_use]
26 pub mod util;
27 pub mod chain;
28 pub mod ln;
29 pub mod routing;
30
31 #[cfg(all(
32                 any(feature = "mutation_testing", feature = "fuzztarget"),
33                 not(any(test, debug_assertions))
34                 ))]
35 const ERR: () = "You should never be building with feature = mutation_testing or feature = fuzztarget! They are used to compile with broken code for testing only!";