mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 23:41:03 +00:00
Link to more complete explanation of the data model
This commit is contained in:
+6
-4
@@ -787,10 +787,10 @@ where
|
|||||||
/// A **data format** that can deserialize any data structure supported by
|
/// A **data format** that can deserialize any data structure supported by
|
||||||
/// Serde.
|
/// Serde.
|
||||||
///
|
///
|
||||||
/// The role of this trait is to define the deserialization half of the Serde
|
/// The role of this trait is to define the deserialization half of the [Serde
|
||||||
/// data model, which is a way to categorize every Rust data type into one of 29
|
/// data model], which is a way to categorize every Rust data type into one of
|
||||||
/// possible types. Each method of the `Serializer` trait corresponds to one of
|
/// 29 possible types. Each method of the `Serializer` trait corresponds to one
|
||||||
/// the types of the data model.
|
/// of the types of the data model.
|
||||||
///
|
///
|
||||||
/// Implementations of `Deserialize` map themselves into this data model by
|
/// Implementations of `Deserialize` map themselves into this data model by
|
||||||
/// passing to the `Deserializer` a `Visitor` implementation that can receive
|
/// passing to the `Deserializer` a `Visitor` implementation that can receive
|
||||||
@@ -873,6 +873,8 @@ where
|
|||||||
/// means your data type will be able to deserialize from self-describing
|
/// means your data type will be able to deserialize from self-describing
|
||||||
/// formats only, ruling out Bincode and many others.
|
/// formats only, ruling out Bincode and many others.
|
||||||
///
|
///
|
||||||
|
/// [Serde data model]: https://serde.rs/data-model.html
|
||||||
|
///
|
||||||
/// # Lifetime
|
/// # Lifetime
|
||||||
///
|
///
|
||||||
/// The `'de` lifetime of this trait is the lifetime of data that may be
|
/// The `'de` lifetime of this trait is the lifetime of data that may be
|
||||||
|
|||||||
@@ -251,10 +251,10 @@ pub trait Serialize {
|
|||||||
|
|
||||||
/// A **data format** that can serialize any data structure supported by Serde.
|
/// A **data format** that can serialize any data structure supported by Serde.
|
||||||
///
|
///
|
||||||
/// The role of this trait is to define the serialization half of the Serde data
|
/// The role of this trait is to define the serialization half of the [Serde
|
||||||
/// model, which is a way to categorize every Rust data structure into one of 29
|
/// data model], which is a way to categorize every Rust data structure into one
|
||||||
/// possible types. Each method of the `Serializer` trait corresponds to one of
|
/// of 29 possible types. Each method of the `Serializer` trait corresponds to
|
||||||
/// the types of the data model.
|
/// one of the types of the data model.
|
||||||
///
|
///
|
||||||
/// Implementations of `Serialize` map themselves into this data model by
|
/// Implementations of `Serialize` map themselves into this data model by
|
||||||
/// invoking exactly one of the `Serializer` methods.
|
/// invoking exactly one of the `Serializer` methods.
|
||||||
@@ -317,6 +317,8 @@ pub trait Serialize {
|
|||||||
/// serializer) that produces a `serde_json::Value` data structure in memory as
|
/// serializer) that produces a `serde_json::Value` data structure in memory as
|
||||||
/// output.
|
/// output.
|
||||||
///
|
///
|
||||||
|
/// [Serde data model]: https://serde.rs/data-model.html
|
||||||
|
///
|
||||||
/// # Example implementation
|
/// # Example implementation
|
||||||
///
|
///
|
||||||
/// The [example data format] presented on the website contains example code for
|
/// The [example data format] presented on the website contains example code for
|
||||||
|
|||||||
Reference in New Issue
Block a user