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
//! Procedural macros for compile-time serialization.
//!
//! This module provides macros that enable serialization during compilation,
//! eliminating runtime overhead for static data.
//!
//! # Macros
//!
//! - `dx_static_serialize!`: Serialize a value at compile time
//! - `include_serialized!`: Load and serialize a file at compile time
//!
//! # Implementation
//!
//! These macros are implemented as procedural macros in the dx-serializer-derive crate.
//! They are re-exported from the main crate when the "derive" feature is enabled.
/// Helper function for const evaluation of serialization.
///
/// This function is used internally by the macros to perform serialization
/// in a const context. It's not intended for direct use.
///
/// # Safety
///
/// This function is safe because it only performs serialization, which
/// doesn't involve unsafe operations in the RKYV implementation.
pub const
where
T: Archive,