1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Pinecone, a minimalistic `no_std` + `alloc` serde format
//!
//! Works just like any other normal serde:
//!
//! ```rust
//! use pinecone::{from_bytes, to_slice, to_vec};
//! use serde::{Deserialize, Serialize};
//!
//! #[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
//! struct Example {
//! foo: String,
//! bar: Option<u32>,
//! zot: bool,
//! }
//!
//! let original = Example {
//! foo: "Vec test".to_string(),
//! bar: Some(0x1337),
//! zot: true,
//! };
//!
//! let bytes: Vec<u8> = to_vec(&original).expect("Serialization failed");
//! assert_eq!(from_bytes(&bytes), Ok(original));
//!
//! let original = Example {
//! foo: "Slice test".to_string(),
//! bar: Some(0x1337),
//! zot: true,
//! };
//!
//! let mut buffer = [0; 1024];
//! to_slice(&original, &mut buffer).expect("Serialization failed");
//! assert_eq!(from_bytes(&buffer), Ok(original));
//! ```
// #![deny(missing_docs)]
// #[cfg(all(test, not(feature = "use-std")))]
// compile_error!("Trying to run tests without std. Supply --features use-std to run.");
extern crate alloc;
pub use Deserializer;
pub use ;
pub use ;
pub use ;