You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/features/serde/mod.rs
+89
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,14 @@
40
40
//! # }
41
41
//! ```
42
42
//!
43
+
//! # `alloc` and `no_std`
44
+
//!
45
+
//! The `serde` feature enables both `alloc` and `std` at this point in time.
46
+
//! To use bincode and serde on no_std targets, try one of the following features:
47
+
//!
48
+
//! - `serde_alloc`: enables `serde` and `alloc`
49
+
//! - `serde_no_std`: enables `serde` without `alloc` or `std`
50
+
//!
43
51
//! # Known issues
44
52
//!
45
53
//! 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.
@@ -66,6 +74,60 @@ pub use self::de_borrowed::*;
66
74
pubuseself::de_owned::*;
67
75
pubuseself::ser::*;
68
76
77
+
/// A serde-specific error that occured while decoding.
78
+
#[derive(Debug,PartialEq)]
79
+
pubenumDecodeError{
80
+
/// Bincode does not support serde's `any` decoding feature
81
+
AnyNotSupported,
82
+
83
+
/// Bincode does not support serde identifiers
84
+
IdentifierNotSupported,
85
+
86
+
/// Bincode does not support serde's `ignored_any`
87
+
IgnoredAnyNotSupported,
88
+
89
+
/// Serde tried decoding a borrowed value from an owned reader. Use `serde_decode_borrowed_from_*` instead
90
+
CannotBorrowOwnedData,
91
+
92
+
/// Could not allocate data like `String` and `Vec<u8>`
93
+
#[cfg(not(feature = "alloc"))]
94
+
CannotAllocate,
95
+
96
+
/// Custom serde error but bincode is unable to allocate a string. Set a breakpoint where this is thrown for more information.
0 commit comments