mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
Merge pull request #1241 from dtolnay/doclink
Convert html links to intra-doc links
This commit is contained in:
commit
7a797810d2
@ -55,7 +55,7 @@ where
|
||||
/// - Deserializer::from_slice
|
||||
/// - Deserializer::from_reader
|
||||
///
|
||||
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
|
||||
/// [`File`]: std::fs::File
|
||||
pub fn new(read: R) -> Self {
|
||||
Deserializer {
|
||||
read,
|
||||
@ -2523,10 +2523,7 @@ where
|
||||
/// reading a file completely into memory and then applying [`from_str`]
|
||||
/// or [`from_slice`] on it. See [issue #160].
|
||||
///
|
||||
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
|
||||
/// [`std::io::BufReader`]: https://doc.rust-lang.org/std/io/struct.BufReader.html
|
||||
/// [`from_str`]: ./fn.from_str.html
|
||||
/// [`from_slice`]: ./fn.from_slice.html
|
||||
/// [`File`]: std::fs::File
|
||||
/// [issue #160]: https://github.com/serde-rs/json/issues/160
|
||||
///
|
||||
/// # Example
|
||||
|
11
src/map.rs
11
src/map.rs
@ -3,8 +3,8 @@
|
||||
//! By default the map is backed by a [`BTreeMap`]. Enable the `preserve_order`
|
||||
//! feature of serde_json to use [`IndexMap`] instead.
|
||||
//!
|
||||
//! [`BTreeMap`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html
|
||||
//! [`IndexMap`]: https://docs.rs/indexmap/*/indexmap/map/struct.IndexMap.html
|
||||
//! [`BTreeMap`]: std::collections::BTreeMap
|
||||
//! [`IndexMap`]: indexmap::IndexMap
|
||||
|
||||
use crate::error::Error;
|
||||
use crate::value::Value;
|
||||
@ -619,8 +619,7 @@ impl<'de> de::IntoDeserializer<'de, Error> for &'de Map<String, Value> {
|
||||
/// A view into a single entry in a map, which may either be vacant or occupied.
|
||||
/// This enum is constructed from the [`entry`] method on [`Map`].
|
||||
///
|
||||
/// [`entry`]: struct.Map.html#method.entry
|
||||
/// [`Map`]: struct.Map.html
|
||||
/// [`entry`]: Map::entry
|
||||
pub enum Entry<'a> {
|
||||
/// A vacant Entry.
|
||||
Vacant(VacantEntry<'a>),
|
||||
@ -629,15 +628,11 @@ pub enum Entry<'a> {
|
||||
}
|
||||
|
||||
/// A vacant Entry. It is part of the [`Entry`] enum.
|
||||
///
|
||||
/// [`Entry`]: enum.Entry.html
|
||||
pub struct VacantEntry<'a> {
|
||||
vacant: VacantEntryImpl<'a>,
|
||||
}
|
||||
|
||||
/// An occupied Entry. It is part of the [`Entry`] enum.
|
||||
///
|
||||
/// [`Entry`]: enum.Entry.html
|
||||
pub struct OccupiedEntry<'a> {
|
||||
occupied: OccupiedEntryImpl<'a>,
|
||||
}
|
||||
|
@ -99,9 +99,9 @@ use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
/// the boxed form of `RawValue` instead. This is almost as efficient but
|
||||
/// involves buffering the raw value from the I/O stream into memory.
|
||||
///
|
||||
/// [`serde_json::from_str`]: ../fn.from_str.html
|
||||
/// [`serde_json::from_slice`]: ../fn.from_slice.html
|
||||
/// [`serde_json::from_reader`]: ../fn.from_reader.html
|
||||
/// [`serde_json::from_str`]: crate::from_str
|
||||
/// [`serde_json::from_slice`]: crate::from_slice
|
||||
/// [`serde_json::from_reader`]: crate::from_reader
|
||||
///
|
||||
/// ```
|
||||
/// # use serde::Deserialize;
|
||||
|
@ -196,7 +196,7 @@ where
|
||||
/// as a [`File`], you will want to apply your own buffering because serde_json
|
||||
/// will not buffer the input. See [`std::io::BufReader`].
|
||||
///
|
||||
/// [`File`]: https://doc.rust-lang.org/std/fs/struct.File.html
|
||||
/// [`File`]: std::fs::File
|
||||
pub fn new(reader: R) -> Self {
|
||||
IoRead {
|
||||
iter: LineColIterator::new(reader.bytes()),
|
||||
|
@ -12,9 +12,9 @@ use core::ops;
|
||||
/// trait is implemented for strings which are used as the index into a JSON
|
||||
/// map, and for `usize` which is used as the index into a JSON array.
|
||||
///
|
||||
/// [`get`]: ../enum.Value.html#method.get
|
||||
/// [`get_mut`]: ../enum.Value.html#method.get_mut
|
||||
/// [square-bracket indexing operator]: ../enum.Value.html#impl-Index%3CI%3E-for-Value
|
||||
/// [`get`]: Value::get
|
||||
/// [`get_mut`]: Value::get_mut
|
||||
/// [square-bracket indexing operator]: Value#impl-Index%3CI%3E-for-Value
|
||||
///
|
||||
/// This trait is sealed and cannot be implemented for types outside of
|
||||
/// `serde_json`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user