secure_gate/
lib.rs

1// src/lib.rs
2// secure-gate v0.5.1
3
4#![cfg_attr(not(feature = "zeroize"), forbid(unsafe_code))]
5extern crate alloc;
6
7// Core modules
8mod dynamic;
9mod expose;
10mod fixed;
11mod macros;
12
13// Feature-gated modules
14#[cfg(feature = "zeroize")]
15mod zeroize;
16
17#[cfg(feature = "serde")]
18mod serde;
19
20// Public API
21pub use dynamic::Dynamic;
22pub use expose::{Expose, ExposeMut};
23pub use fixed::Fixed;
24
25// Zeroize integration (opt-in)
26#[cfg(feature = "zeroize")]
27pub use zeroize::{DynamicZeroizing, FixedZeroizing};
28
29// Re-export Zeroizing cleanly — no privacy conflict
30#[cfg(feature = "zeroize")]
31pub type Zeroizing<T> = ::zeroize::Zeroizing<T>;
32
33// Re-export the trait and marker directly from the zeroize crate
34#[cfg(feature = "zeroize")]
35pub use ::zeroize::{Zeroize, ZeroizeOnDrop};