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
//! # Serde Binary Advanced
//!
//! Serde Binary Advanced is a [Serde](https://crates.io/crates/serde) library enabling the
//! serialization and deserialization of Rust objects to and from binary representations.
//!
//! ## Features
//!
//! - Serialization and deserialization of Rust data structures to and from raw binary format
//! - Full support for all Rust native types
//! - Comprehensive error reporting
//!
//! ## Installation
//!
//! Add this to your Cargo.toml:
//!
//! ```toml
//! [dependencies]
//! serde = { version = "1", features = ["derive"] }
//! serde_binary_adv = { version = "1" }
//! ```
//!
//! ## Usage
//!
//! Here's a quick example on how to use Serde Binary Advanced to serialize and deserialize a struct to and from binary:
//!
//! ```rust
//! use serde::{Serialize, Deserialize};
//!
//! # [derive(Serialize, Deserialize)]
//! struct Point {
//! x: i64,
//! y: i64,
//! }
//!
//! fn main() -> Result<(),Error> {
//! let point = Point { x: 1.0, y: 2.0 };
//!
//! // Serialize to bytes
//! let raw: Vec<u8> = serde_binary_adv::to_bytes(&point)?;
//! assert_eq!(raw, vec![0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02]);
//!
//! // Deserialize from bytes
//! let deserialized_point: Point = serde_yml::from_bytes(&raw)?;
//! assert_eq!(point, deserialized_point);
//!
//! Ok(())
//! }
//! ```
//!
//! ## Legal
//!
//! Serde Binary Advanced is copyright © 2025 JEleniel and released under either [The MIT License](LICENSE-MIT.md)
//! or [The Apache License](LICENSE-Apache.md), at your option.
//!
//! Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you
//! shall be licensed as above, without any additional terms or conditions.
pub use *;