serde_spanned/lib.rs
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#![cfg_attr(docsrs, feature(doc_auto_cfg))]
9#![warn(missing_docs)]
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#![warn(clippy::print_stderr)]
16#![warn(clippy::print_stdout)]
17
18mod spanned;
19pub use crate::spanned::Spanned;
20
21#[doc(hidden)]
22#[cfg(feature = "serde")]
23pub mod __unstable {
24 pub use crate::spanned::is_spanned;
25 pub use crate::spanned::END_FIELD;
26 pub use crate::spanned::NAME;
27 pub use crate::spanned::START_FIELD;
28 pub use crate::spanned::VALUE_FIELD;
29}