docs: update to docs on codecs
This commit is contained in:
committed by
Vincent Herlemont
parent
ac150841b0
commit
b85d4ce554
@@ -20,21 +20,22 @@
|
||||
//! `native_model` comes with several optional built-in serializer features
|
||||
//! available:
|
||||
//!
|
||||
//! - [bincode](https://crates.io/crates/bincode/1.3.3) `1.3` · This is the
|
||||
//! - [bincode 1.3](https://crates.io/crates/bincode/1.3.3) · This is the
|
||||
//! default codec. **Warning: This codec may not work with all serde-derived
|
||||
//! types.**
|
||||
//!
|
||||
//! - [bincode](https://crates.io/crates/bincode/2.0.0-rc.3) `2.0.0-rc.3` ·
|
||||
//! - [bincode 2.0.0-rc.3](https://crates.io/crates/bincode/2.0.0-rc.3) ·
|
||||
//! Enable the `bincode_2_rc` feature and use the
|
||||
//! `native_model::bincode_2_rc::Bincode` attribute to have `native_db` use this
|
||||
//! crate. **Warning: This codec may not work with all serde-derived types.**
|
||||
//! crate for serializing & deserializing. **Warning: This codec may not work
|
||||
//! with all serde-derived types.**
|
||||
//!
|
||||
//! - [postcard](https://crates.io/crates/postcard/1.0.8) `1.0` ·
|
||||
//! - [postcard 1.0](https://crates.io/crates/postcard/1.0.8) ·
|
||||
//! Enable the `postcard_1_0` feature and use the
|
||||
//! `native_model::postcard_1_0::PostCard` attribute. **Warning: This codec may
|
||||
//! not work with all serde-derived types.**
|
||||
//!
|
||||
//! - [rmp-serde](https://crates.io/crates/rmp-serde/1.3.0) `1.3` ·
|
||||
//! - [rmp-serde 1.3](https://crates.io/crates/rmp-serde/1.3.0) ·
|
||||
//! Enable the `rmp_serde_1_3` feature and use the
|
||||
//! `native_model::rmp_serde_1_3::RmpSerde` attribute.
|
||||
//!
|
||||
@@ -53,7 +54,8 @@
|
||||
//! native_model = { version = "0.4", features = [ "rmp_serde_1_3" ] }
|
||||
//! ```
|
||||
//!
|
||||
//! 2. Assign the `rmp_serde_1_3` codec to your type using the `with` attribute:
|
||||
//! 2. Assign the `rmp_serde_1_3` codec to your `struct` using the `with`
|
||||
//! attribute:
|
||||
//!
|
||||
//! ```rust
|
||||
//! #[derive(Clone, Default, serde::Deserialize, serde::Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user