`Zeroizing<T>` requires the stored type T itself to implement `Zeroize`. `[u8]` does but `&mut [u8]` does not. I have a large reusable validator buffer where I need per-validation cleanup. Current workaround is a small guard: ```rust struct ZeroizeOnDrop<'a>(&'a mut [u8]); impl Drop for ZeroizeOnDrop<'_> { fn drop(&mut self) { self.0.zeroize(); } } ``` Would you be open to adding an official borrowed guard, e.g. `ZeroizingRef<'a, T: Zeroize + ?Sized>(&'a mut T)`, for this use case? I'm open to alternatives
Activity