Rustdoc: Add links. Show all reexports as reexports. (#377)
* Rustdoc: Add links. Show all reexports as reexports. * Reformat.
This commit is contained in:
parent
cd96581730
commit
f12a16274b
23
src/lib.rs
23
src/lib.rs
|
@ -21,7 +21,7 @@
|
||||||
//!
|
//!
|
||||||
//! ## TOML values
|
//! ## TOML values
|
||||||
//!
|
//!
|
||||||
//! A value in TOML is represented with the `Value` enum in this crate:
|
//! A value in TOML is represented with the [`Value`] enum in this crate:
|
||||||
//!
|
//!
|
||||||
//! ```rust,ignore
|
//! ```rust,ignore
|
||||||
//! pub enum Value {
|
//! pub enum Value {
|
||||||
|
@ -35,13 +35,13 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! TOML is similar to JSON with the notable addition of a `Datetime`
|
//! TOML is similar to JSON with the notable addition of a [`Datetime`]
|
||||||
//! type. In general, TOML and JSON are interchangeable in terms of
|
//! type. In general, TOML and JSON are interchangeable in terms of
|
||||||
//! formats.
|
//! formats.
|
||||||
//!
|
//!
|
||||||
//! ## Parsing TOML
|
//! ## Parsing TOML
|
||||||
//!
|
//!
|
||||||
//! The easiest way to parse a TOML document is via the `Value` type:
|
//! The easiest way to parse a TOML document is via the [`Value`] type:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use toml::Value;
|
//! use toml::Value;
|
||||||
|
@ -51,9 +51,9 @@
|
||||||
//! assert_eq!(value["foo"].as_str(), Some("bar"));
|
//! assert_eq!(value["foo"].as_str(), Some("bar"));
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! The `Value` type implements a number of convenience methods and
|
//! The [`Value`] type implements a number of convenience methods and
|
||||||
//! traits; the example above uses `FromStr` to parse a `str` into a
|
//! traits; the example above uses [`FromStr`] to parse a [`str`] into a
|
||||||
//! `Value`.
|
//! [`Value`].
|
||||||
//!
|
//!
|
||||||
//! ## Deserialization and Serialization
|
//! ## Deserialization and Serialization
|
||||||
//!
|
//!
|
||||||
|
@ -70,8 +70,8 @@
|
||||||
//! * `Deserializer for Value`
|
//! * `Deserializer for Value`
|
||||||
//!
|
//!
|
||||||
//! This means that you can use Serde to deserialize/serialize the
|
//! This means that you can use Serde to deserialize/serialize the
|
||||||
//! `Value` type as well as the `Datetime` type in this crate. You can also
|
//! [`Value`] type as well as the [`Datetime`] type in this crate. You can also
|
||||||
//! use the `Deserializer`, `Serializer`, or `Value` type itself to act as
|
//! use the [`Deserializer`], [`Serializer`], or [`Value`] type itself to act as
|
||||||
//! a deserializer/serializer for arbitrary types.
|
//! a deserializer/serializer for arbitrary types.
|
||||||
//!
|
//!
|
||||||
//! An example of deserializing with TOML is:
|
//! An example of deserializing with TOML is:
|
||||||
|
@ -171,4 +171,11 @@ mod tokens;
|
||||||
pub mod macros;
|
pub mod macros;
|
||||||
|
|
||||||
mod spanned;
|
mod spanned;
|
||||||
|
#[doc(no_inline)]
|
||||||
pub use crate::spanned::Spanned;
|
pub use crate::spanned::Spanned;
|
||||||
|
|
||||||
|
// Just for rustdoc
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use crate::datetime::Datetime;
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use core::str::FromStr;
|
||||||
|
|
|
@ -13,6 +13,7 @@ use serde::de::IntoDeserializer;
|
||||||
use serde::ser;
|
use serde::ser;
|
||||||
|
|
||||||
use crate::datetime::{self, DatetimeFromString};
|
use crate::datetime::{self, DatetimeFromString};
|
||||||
|
#[doc(no_inline)]
|
||||||
pub use crate::datetime::{Datetime, DatetimeParseError};
|
pub use crate::datetime::{Datetime, DatetimeParseError};
|
||||||
|
|
||||||
pub use crate::map::Map;
|
pub use crate::map::Map;
|
||||||
|
|
Loading…
Reference in a new issue