fix: removed #![feature(doc_cfg)] nightly feature

This commit is contained in:
Dylan Bowker
2024-05-12 14:12:05 -06:00
committed by Vincent Herlemont
parent 95e68f235e
commit 2196af7a82
5 changed files with 90 additions and 23 deletions
@@ -1,6 +1,7 @@
//! ⚠️ [`Read the docs before using`](crate::postcard_1_0::PostCard#warning) -
//! Annotate your type with `native_model::postcard_1_0::PostCard` to
//! use the postcard 1.0 crate for serializing & deserializing.
//! Enable the `postcard_1_0` feature and annotate your type with
//! `native_model::postcard_1_0::PostCard` to have `native_db` use the postcard
//! 1.0 crate for serializing & deserializing.
/// Used to specify the [postcard](https://crates.io/crates/postcard/1.0.8)
/// `1.0` crate for serialization & deserialization.
@@ -10,21 +11,25 @@
/// `postcard` does not implement all [serde](https://crates.io/crates/serde)
/// features. Errors may be encountered when using this with some types.
///
/// If you are encountering errors when using this codec on your types, try
/// using the `rmp_serde_1_3` codec instead.
///
/// # Basic usage
///
/// Use the [`with`](crate::native_model) attribute on your type to instruct
/// After enabling the `postcard_1_0` feature in your `Cargo.toml`, use the
/// [`with`](crate::native_model) attribute on your type to instruct
/// `native_model` to use `PostCard` for serialization & deserialization.
///
/// Example:
/// Example usage:
///
/// ```rust
/// #[derive(Clone, Default, serde::Deserialize, serde::Serialize)]
/// #[native_model(id = 1, version = 1, with = native_model::postcard_1_0::PostCard)]
/// struct MyStruct {
/// my_string: String
/// }
/// ```
#[doc(cfg(all(feature = "serde", feature = "postcard_1_0")))]
pub struct PostCard;
#[cfg(all(feature = "serde", feature = "postcard_1_0"))]