MCPcopy Create free account
hub / github.com/RustCrypto/utils / derive_zeroize_on_drop

Function derive_zeroize_on_drop

zeroize_derive/src/lib.rs:95–97  ·  view source on GitHub ↗
(input: proc_macro::TokenStream)

Source from the content-addressed store, hash-verified

93/// - `#[zeroize(skip)]`: skips this field or variant when calling `zeroize()`
94#[proc_macro_derive(ZeroizeOnDrop, attributes(zeroize))]
95pub fn derive_zeroize_on_drop(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
96 derive_zeroize_on_drop_impl(syn::parse_macro_input!(input as DeriveInput)).into()
97}
98
99fn derive_zeroize_on_drop_impl(input: DeriveInput) -> TokenStream {
100 let zeroizers = generate_fields(&input, quote! { zeroize_or_on_drop });

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected