diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -45,6 +45,8 @@ //! definition. //! - [JSON5], a superset of JSON including some productions from ES5. //! - [URL] query strings, in the x-www-form-urlencoded format. +//! - [Starlark], the format used for describing build targets by the Bazel and +//! Buck build systems. *(serialization only)* //! - [Envy], a way to deserialize environment variables into Rust structs. //! *(deserialization only)* //! - [Envy Store], a way to deserialize [AWS Parameter Store] parameters into @@ -74,6 +76,7 @@ //! [Avro]: https://docs.rs/apache-avro //! [JSON5]: https://github.com/callum-oakley/json5-rs //! [URL]: https://docs.rs/serde_qs +//! [Starlark]: https://github.com/dtolnay/serde-starlark //! [Envy]: https://github.com/softprops/envy //! [Envy Store]: https://github.com/softprops/envy-store //! [Cargo]: https://doc.rust-lang.org/cargo/reference/manifest.html @@ -90,7 +93,7 @@ //////////////////////////////////////////////////////////////////////////////// // Serde types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/serde/1.0.152")] +#![doc(html_root_url = "https://docs.rs/serde/1.0.158")] // Support using Serde without the standard library! #![cfg_attr(not(feature = "std"), no_std)] // Unstable functionality only if the user asks for it. For tracking and @@ -127,6 +130,7 @@ derive_partial_eq_without_eq, enum_glob_use, explicit_auto_deref, + let_underscore_untyped, map_err_ignore, new_without_default, result_unit_err, @@ -215,13 +219,23 @@ mod lib { #[cfg(feature = "std")] pub use std::collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque}; + #[cfg(all(not(no_core_cstr), not(feature = "std")))] + pub use core::ffi::CStr; + #[cfg(feature = "std")] + pub use std::ffi::CStr; + + #[cfg(all(not(no_core_cstr), feature = "alloc", not(feature = "std")))] + pub use alloc::ffi::CString; + #[cfg(feature = "std")] + pub use std::ffi::CString; + #[cfg(feature = "std")] pub use std::{error, net}; #[cfg(feature = "std")] pub use std::collections::{HashMap, HashSet}; #[cfg(feature = "std")] - pub use std::ffi::{CStr, CString, OsStr, OsString}; + pub use std::ffi::{OsStr, OsString}; #[cfg(feature = "std")] pub use std::hash::{BuildHasher, Hash}; #[cfg(feature = "std")] @@ -324,9 +338,10 @@ mod std_error; #[allow(unused_imports)] #[macro_use] extern crate serde_derive; + +/// Derive macro available if serde is built with `features = ["derive"]`. #[cfg(feature = "serde_derive")] -#[doc(hidden)] -pub use serde_derive::*; +pub use serde_derive::{Deserialize, Serialize}; #[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))] mod actually_private { |