#[cfg(any(feature = "serialization", feature = "warmup"))]
pub const MAX_JSON_SIZE: usize = 5 * 1024 * 1024;
#[cfg(any(
feature = "serialization",
feature = "memory",
feature = "redis",
feature = "disk"
))]
pub const MAX_JSON_DEPTH: usize = 64;
#[cfg(any(feature = "memory", feature = "redis", feature = "disk"))]
pub const NULL_SENTINEL: &[u8] = b"\x00OXNULL";
#[cfg(any(feature = "memory", feature = "redis", feature = "disk"))]
pub const DEFAULT_TTL_JITTER_FACTOR: f64 = 0.1;
#[cfg(all(
test,
any(feature = "serialization", feature = "memory", feature = "redis")
))]
mod tests {
use super::*;
#[test]
fn test_constants_values() {
#[cfg(any(feature = "serialization", feature = "warmup"))]
assert_eq!(MAX_JSON_SIZE, 5 * 1024 * 1024);
#[cfg(any(
feature = "serialization",
feature = "memory",
feature = "redis",
feature = "disk"
))]
assert_eq!(MAX_JSON_DEPTH, 64);
#[cfg(any(feature = "memory", feature = "redis", feature = "disk"))]
assert_eq!(NULL_SENTINEL, b"\x00OXNULL");
}
}