pub struct CloneableArrayInner<const N: usize>(/* private fields */);Expand description
Inner wrapper for a fixed-size array of bytes that can be safely cloned as a secret.
This struct wraps a [u8; N] array and implements the necessary traits for secure
secret handling: Clone for duplication and Zeroize for secure memory wiping.
The zeroize(drop) attribute ensures the array is zeroized when this struct is dropped.
Trait Implementations§
Source§impl<const N: usize> Clone for CloneableArrayInner<N>
impl<const N: usize> Clone for CloneableArrayInner<N>
Source§fn clone(&self) -> CloneableArrayInner<N>
fn clone(&self) -> CloneableArrayInner<N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> PartialEq for CloneableArrayInner<N>
impl<const N: usize> PartialEq for CloneableArrayInner<N>
Source§impl<const N: usize> Zeroize for CloneableArrayInner<N>
impl<const N: usize> Zeroize for CloneableArrayInner<N>
impl<const N: usize> CloneSafe for CloneableArrayInner<N>
impl<const N: usize> StructuralPartialEq for CloneableArrayInner<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for CloneableArrayInner<N>
impl<const N: usize> RefUnwindSafe for CloneableArrayInner<N>
impl<const N: usize> Send for CloneableArrayInner<N>
impl<const N: usize> Sync for CloneableArrayInner<N>
impl<const N: usize> Unpin for CloneableArrayInner<N>
impl<const N: usize> UnwindSafe for CloneableArrayInner<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more