Move Postcard link up to Bincode spot
Bincode has been in prerelease limbo for nearly a year and the readme does not mention anything related to Serde, so it is not serving as a good first link to a Serde binary format.
This commit is contained in:
parent
85e72653c8
commit
10e4839f83
@ -30,7 +30,7 @@
|
|||||||
//! # The Deserializer trait
|
//! # The Deserializer trait
|
||||||
//!
|
//!
|
||||||
//! [`Deserializer`] implementations are provided by third-party crates, for
|
//! [`Deserializer`] implementations are provided by third-party crates, for
|
||||||
//! example [`serde_json`], [`serde_yaml`] and [`bincode`].
|
//! example [`serde_json`], [`serde_yaml`] and [`postcard`].
|
||||||
//!
|
//!
|
||||||
//! A partial list of well-maintained formats is given on the [Serde
|
//! A partial list of well-maintained formats is given on the [Serde
|
||||||
//! website][data formats].
|
//! website][data formats].
|
||||||
@ -104,7 +104,7 @@
|
|||||||
//! [`Deserialize`]: ../trait.Deserialize.html
|
//! [`Deserialize`]: ../trait.Deserialize.html
|
||||||
//! [`Deserializer`]: ../trait.Deserializer.html
|
//! [`Deserializer`]: ../trait.Deserializer.html
|
||||||
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
|
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
|
||||||
//! [`bincode`]: https://github.com/bincode-org/bincode
|
//! [`postcard`]: https://github.com/jamesmunns/postcard
|
||||||
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
|
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
|
||||||
//! [`serde_derive`]: https://crates.io/crates/serde_derive
|
//! [`serde_derive`]: https://crates.io/crates/serde_derive
|
||||||
//! [`serde_json`]: https://github.com/serde-rs/json
|
//! [`serde_json`]: https://github.com/serde-rs/json
|
||||||
@ -874,7 +874,7 @@ where
|
|||||||
/// `Deserializer::deserialize_any`.
|
/// `Deserializer::deserialize_any`.
|
||||||
///
|
///
|
||||||
/// 2. The various `deserialize_*` methods. Non-self-describing formats like
|
/// 2. The various `deserialize_*` methods. Non-self-describing formats like
|
||||||
/// Bincode need to be told what is in the input in order to deserialize it.
|
/// Postcard need to be told what is in the input in order to deserialize it.
|
||||||
/// The `deserialize_*` methods are hints to the deserializer for how to
|
/// The `deserialize_*` methods are hints to the deserializer for how to
|
||||||
/// interpret the next piece of input. Non-self-describing formats are not
|
/// interpret the next piece of input. Non-self-describing formats are not
|
||||||
/// able to deserialize something like `serde_json::Value` which relies on
|
/// able to deserialize something like `serde_json::Value` which relies on
|
||||||
@ -884,7 +884,7 @@ where
|
|||||||
/// `Deserializer::deserialize_any` unless you need to be told by the
|
/// `Deserializer::deserialize_any` unless you need to be told by the
|
||||||
/// Deserializer what type is in the input. Know that relying on
|
/// Deserializer what type is in the input. Know that relying on
|
||||||
/// `Deserializer::deserialize_any` means your data type will be able to
|
/// `Deserializer::deserialize_any` means your data type will be able to
|
||||||
/// deserialize from self-describing formats only, ruling out Bincode and many
|
/// deserialize from self-describing formats only, ruling out Postcard and many
|
||||||
/// others.
|
/// others.
|
||||||
///
|
///
|
||||||
/// [Serde data model]: https://serde.rs/data-model.html
|
/// [Serde data model]: https://serde.rs/data-model.html
|
||||||
@ -915,7 +915,7 @@ pub trait Deserializer<'de>: Sized {
|
|||||||
/// `Deserializer::deserialize_any` unless you need to be told by the
|
/// `Deserializer::deserialize_any` unless you need to be told by the
|
||||||
/// Deserializer what type is in the input. Know that relying on
|
/// Deserializer what type is in the input. Know that relying on
|
||||||
/// `Deserializer::deserialize_any` means your data type will be able to
|
/// `Deserializer::deserialize_any` means your data type will be able to
|
||||||
/// deserialize from self-describing formats only, ruling out Bincode and
|
/// deserialize from self-describing formats only, ruling out Postcard and
|
||||||
/// many others.
|
/// many others.
|
||||||
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
|
fn deserialize_any<V>(self, visitor: V) -> Result<V::Value, Self::Error>
|
||||||
where
|
where
|
||||||
@ -1156,7 +1156,7 @@ pub trait Deserializer<'de>: Sized {
|
|||||||
/// Some types have a human-readable form that may be somewhat expensive to
|
/// Some types have a human-readable form that may be somewhat expensive to
|
||||||
/// construct, as well as a binary form that is compact and efficient.
|
/// construct, as well as a binary form that is compact and efficient.
|
||||||
/// Generally text-based formats like JSON and YAML will prefer to use the
|
/// Generally text-based formats like JSON and YAML will prefer to use the
|
||||||
/// human-readable one and binary formats like Bincode will prefer the
|
/// human-readable one and binary formats like Postcard will prefer the
|
||||||
/// compact one.
|
/// compact one.
|
||||||
///
|
///
|
||||||
/// ```edition2018
|
/// ```edition2018
|
||||||
@ -1560,7 +1560,7 @@ pub trait Visitor<'de>: Sized {
|
|||||||
/// `Deserializer`.
|
/// `Deserializer`.
|
||||||
///
|
///
|
||||||
/// This enables zero-copy deserialization of bytes in some formats. For
|
/// This enables zero-copy deserialization of bytes in some formats. For
|
||||||
/// example Bincode data containing bytes can be deserialized with zero
|
/// example Postcard data containing bytes can be deserialized with zero
|
||||||
/// copying into a `&'a [u8]` as long as the input data outlives `'a`.
|
/// copying into a `&'a [u8]` as long as the input data outlives `'a`.
|
||||||
///
|
///
|
||||||
/// The default implementation forwards to `visit_bytes`.
|
/// The default implementation forwards to `visit_bytes`.
|
||||||
|
@ -31,8 +31,7 @@
|
|||||||
//! for Serde by the community.
|
//! for Serde by the community.
|
||||||
//!
|
//!
|
||||||
//! - [JSON], the ubiquitous JavaScript Object Notation used by many HTTP APIs.
|
//! - [JSON], the ubiquitous JavaScript Object Notation used by many HTTP APIs.
|
||||||
//! - [Bincode], a compact binary format
|
//! - [Postcard], a no\_std and embedded-systems friendly compact binary format.
|
||||||
//! used for IPC within the Servo rendering engine.
|
|
||||||
//! - [CBOR], a Concise Binary Object Representation designed for small message
|
//! - [CBOR], a Concise Binary Object Representation designed for small message
|
||||||
//! size without the need for version negotiation.
|
//! size without the need for version negotiation.
|
||||||
//! - [YAML], a self-proclaimed human-friendly configuration language that ain't
|
//! - [YAML], a self-proclaimed human-friendly configuration language that ain't
|
||||||
@ -45,7 +44,6 @@
|
|||||||
//! - [Avro], a binary format used within Apache Hadoop, with support for schema
|
//! - [Avro], a binary format used within Apache Hadoop, with support for schema
|
||||||
//! definition.
|
//! definition.
|
||||||
//! - [JSON5], a superset of JSON including some productions from ES5.
|
//! - [JSON5], a superset of JSON including some productions from ES5.
|
||||||
//! - [Postcard], a no\_std and embedded-systems friendly compact binary format.
|
|
||||||
//! - [URL] query strings, in the x-www-form-urlencoded format.
|
//! - [URL] query strings, in the x-www-form-urlencoded format.
|
||||||
//! - [Envy], a way to deserialize environment variables into Rust structs.
|
//! - [Envy], a way to deserialize environment variables into Rust structs.
|
||||||
//! *(deserialization only)*
|
//! *(deserialization only)*
|
||||||
@ -59,7 +57,7 @@
|
|||||||
//! and from DynamoDB.
|
//! and from DynamoDB.
|
||||||
//!
|
//!
|
||||||
//! [JSON]: https://github.com/serde-rs/json
|
//! [JSON]: https://github.com/serde-rs/json
|
||||||
//! [Bincode]: https://github.com/bincode-org/bincode
|
//! [Postcard]: https://github.com/jamesmunns/postcard
|
||||||
//! [CBOR]: https://github.com/enarx/ciborium
|
//! [CBOR]: https://github.com/enarx/ciborium
|
||||||
//! [YAML]: https://github.com/dtolnay/serde-yaml
|
//! [YAML]: https://github.com/dtolnay/serde-yaml
|
||||||
//! [MessagePack]: https://github.com/3Hren/msgpack-rust
|
//! [MessagePack]: https://github.com/3Hren/msgpack-rust
|
||||||
@ -69,7 +67,6 @@
|
|||||||
//! [BSON]: https://github.com/mongodb/bson-rust
|
//! [BSON]: https://github.com/mongodb/bson-rust
|
||||||
//! [Avro]: https://github.com/flavray/avro-rs
|
//! [Avro]: https://github.com/flavray/avro-rs
|
||||||
//! [JSON5]: https://github.com/callum-oakley/json5-rs
|
//! [JSON5]: https://github.com/callum-oakley/json5-rs
|
||||||
//! [Postcard]: https://github.com/jamesmunns/postcard
|
|
||||||
//! [URL]: https://docs.rs/serde_qs
|
//! [URL]: https://docs.rs/serde_qs
|
||||||
//! [Envy]: https://github.com/softprops/envy
|
//! [Envy]: https://github.com/softprops/envy
|
||||||
//! [Envy Store]: https://github.com/softprops/envy-store
|
//! [Envy Store]: https://github.com/softprops/envy-store
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
//! # The Serializer trait
|
//! # The Serializer trait
|
||||||
//!
|
//!
|
||||||
//! [`Serializer`] implementations are provided by third-party crates, for
|
//! [`Serializer`] implementations are provided by third-party crates, for
|
||||||
//! example [`serde_json`], [`serde_yaml`] and [`bincode`].
|
//! example [`serde_json`], [`serde_yaml`] and [`postcard`].
|
||||||
//!
|
//!
|
||||||
//! A partial list of well-maintained formats is given on the [Serde
|
//! A partial list of well-maintained formats is given on the [Serde
|
||||||
//! website][data formats].
|
//! website][data formats].
|
||||||
@ -99,7 +99,7 @@
|
|||||||
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
|
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
|
||||||
//! [`Serialize`]: ../trait.Serialize.html
|
//! [`Serialize`]: ../trait.Serialize.html
|
||||||
//! [`Serializer`]: ../trait.Serializer.html
|
//! [`Serializer`]: ../trait.Serializer.html
|
||||||
//! [`bincode`]: https://github.com/bincode-org/bincode
|
//! [`postcard`]: https://github.com/jamesmunns/postcard
|
||||||
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
|
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
|
||||||
//! [`serde_derive`]: https://crates.io/crates/serde_derive
|
//! [`serde_derive`]: https://crates.io/crates/serde_derive
|
||||||
//! [`serde_json`]: https://github.com/serde-rs/json
|
//! [`serde_json`]: https://github.com/serde-rs/json
|
||||||
@ -314,7 +314,7 @@ pub trait Serialize {
|
|||||||
/// - For example the `E::S` in `enum E { S { r: u8, g: u8, b: u8 } }`.
|
/// - For example the `E::S` in `enum E { S { r: u8, g: u8, b: u8 } }`.
|
||||||
///
|
///
|
||||||
/// Many Serde serializers produce text or binary data as output, for example
|
/// Many Serde serializers produce text or binary data as output, for example
|
||||||
/// JSON or Bincode. This is not a requirement of the `Serializer` trait, and
|
/// JSON or Postcard. This is not a requirement of the `Serializer` trait, and
|
||||||
/// there are serializers that do not produce text or binary output. One example
|
/// there are serializers that do not produce text or binary output. One example
|
||||||
/// is the `serde_json::value::Serializer` (distinct from the main `serde_json`
|
/// is the `serde_json::value::Serializer` (distinct from the main `serde_json`
|
||||||
/// serializer) that produces a `serde_json::Value` data structure in memory as
|
/// serializer) that produces a `serde_json::Value` data structure in memory as
|
||||||
@ -1423,7 +1423,7 @@ pub trait Serializer: Sized {
|
|||||||
/// Some types have a human-readable form that may be somewhat expensive to
|
/// Some types have a human-readable form that may be somewhat expensive to
|
||||||
/// construct, as well as a binary form that is compact and efficient.
|
/// construct, as well as a binary form that is compact and efficient.
|
||||||
/// Generally text-based formats like JSON and YAML will prefer to use the
|
/// Generally text-based formats like JSON and YAML will prefer to use the
|
||||||
/// human-readable one and binary formats like Bincode will prefer the
|
/// human-readable one and binary formats like Postcard will prefer the
|
||||||
/// compact one.
|
/// compact one.
|
||||||
///
|
///
|
||||||
/// ```edition2018
|
/// ```edition2018
|
||||||
|
Loading…
Reference in New Issue
Block a user