1#![cfg_attr(not(feature = "std"), no_std)]
23#[cfg(not(any(feature = "std", feature = "alloc")))]
4compile_error!("Either feature `std` or `alloc` must be enabled for this crate.");
5#[cfg(all(feature = "std", feature = "alloc"))]
6compile_error!("Feature `std` and `alloc` can't be enabled at the same time.");
78mod contextual_display;
9#[cfg(feature = "serde")]
10mod contextual_serialize;
11mod contextual_try_from_into;
12pub mod iterators;
13mod macros;
14mod resolve;
15pub mod rust;
16mod slice;
17#[cfg(feature = "unicode")]
18pub mod unicode;
1920pub use contextual_display::*;
21#[cfg(feature = "serde")]
22pub use contextual_serialize::*;
23pub use contextual_try_from_into::*;
24pub use resolve::*;
25pub use slice::*;
2627/// Each module should have its own prelude, which:
28/// * Adds preludes of upstream crates
29/// * Exports types with specific-enough names which mean they can safely be used downstream.
30///
31/// The idea is that we can just include the current crate's prelude and avoid messing around with tons of includes.
32/// This makes refactors easier, and makes integration into the node less painful.
33pub mod prelude {
34// Add all rust types so that things work in no-std
35pub use crate::rust::prelude::*;
3637// Export types and other useful methods
38pub use crate::contextual_display::*;
39#[cfg(feature = "serde")]
40pub use crate::contextual_serialize::*;
41pub use crate::contextual_try_from_into::*;
42pub use crate::resolve::*;
43pub use crate::{
44 labelled_resolvable_using_resolvable_impl, labelled_resolvable_with_identity_impl,
45 resolvable_with_identity_impl, resolvable_with_try_into_impls,
46 };
4748pub use crate::iterators::*;
49pub use crate::slice::*;
5051pub use crate::assert_matches;
52}