1 | //! A [serde]-compatible spanned Value |
2 | //! |
3 | //! This allows capturing the location, in bytes, for a value in the original parsed document for |
4 | //! compatible deserializers. |
5 | //! |
6 | //! [serde]: https://serde.rs/ |
7 | |
8 | #![deny (missing_docs)] |
9 | #![warn (rust_2018_idioms)] |
10 | // Makes rustc abort compilation if there are any unsafe blocks in the crate. |
11 | // Presence of this annotation is picked up by tools such as cargo-geiger |
12 | // and lets them ensure that there is indeed no unsafe code as opposed to |
13 | // something they couldn't detect (e.g. unsafe added via macro expansion, etc). |
14 | #![forbid (unsafe_code)] |
15 | #![cfg_attr (docsrs, feature(doc_auto_cfg))] |
16 | |
17 | mod spanned; |
18 | pub use crate::spanned::Spanned; |
19 | |
20 | #[doc (hidden)] |
21 | #[cfg (feature = "serde" )] |
22 | pub mod __unstable { |
23 | pub use crate::spanned::is_spanned; |
24 | pub use crate::spanned::END_FIELD; |
25 | pub use crate::spanned::NAME; |
26 | pub use crate::spanned::START_FIELD; |
27 | pub use crate::spanned::VALUE_FIELD; |
28 | } |
29 | |