mirror of https://git.sr.ht/~stygianentity/bincode
Added `[serde(tag)]` to the list of tags that are known to give issues (#584)
* Added `[serde(tag)]` to the list of tags that are known to give issues * Removed the old warning about serde and no-std. Added references to the documentation in the serde::DecodeError enum
This commit is contained in:
parent
c179d2de69
commit
b2977bd3ed
|
|
@ -41,14 +41,13 @@
|
|||
//!
|
||||
//! # Known issues
|
||||
//!
|
||||
//! Currently the `serde` feature will automatically enable the `alloc` and `std` feature. If you're running in a `#[no_std]` environment consider using bincode's own derive macros.
|
||||
//!
|
||||
//! Because bincode is a format without meta data, there are several known issues with serde's attributes. Please do not use any of the following attributes if you plan on using bincode, or use bincode's own `derive` macros.
|
||||
//! - `#[serde(skip)]`
|
||||
//! - `#[serde(skip_serializing)]`
|
||||
//! - `#[serde(skip_deserializing)]`
|
||||
//! - `#[serde(skip_serializing_if = "path")]`
|
||||
//! - `#[serde(flatten)]`
|
||||
//! - `#[serde(skip)]`
|
||||
//! - `#[serde(skip_deserializing)]`
|
||||
//! - `#[serde(skip_serializing)]`
|
||||
//! - `#[serde(skip_serializing_if = "path")]`
|
||||
//! - `#[serde(tag = "...")]`
|
||||
//! - `#[serde(untagged)]`
|
||||
//!
|
||||
//! **Using any of the above attributes can and will cause issues with bincode and will result in lost data**. Consider using bincode's own derive macro instead.
|
||||
|
|
@ -68,13 +67,17 @@ pub use self::ser::*;
|
|||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum DecodeError {
|
||||
/// Bincode does not support serde's `any` decoding feature
|
||||
/// Bincode does not support serde's `any` decoding feature.
|
||||
///
|
||||
/// See the "known issues" list in the serde module for more information on this.
|
||||
AnyNotSupported,
|
||||
|
||||
/// Bincode does not support serde identifiers
|
||||
IdentifierNotSupported,
|
||||
|
||||
/// Bincode does not support serde's `ignored_any`
|
||||
/// Bincode does not support serde's `ignored_any`.
|
||||
///
|
||||
/// See the "known issues" list in the serde module for more information on this.
|
||||
IgnoredAnyNotSupported,
|
||||
|
||||
/// Serde tried decoding a borrowed value from an owned reader. Use `serde_decode_borrowed_from_*` instead
|
||||
|
|
|
|||
Loading…
Reference in New Issue