#[repr(transparent)]
pub struct TempKey<T: AsMut<[u8]>>(_);
Expand description
Temporary Key
use seckey::{ TempKey, CmpKey };
let mut key = [8u8; 8];
let key = TempKey::new(&mut key);
assert_eq!(CmpKey(&key[..]), &[8u8; 8][..]);
- It will zero the value when
Drop
.
- It will refuse to accept if
T
is reference or pointer, to avoid causing null pointer.
- It is a reference, to avoid it from being affected by stack copy (return value).
Formats the value using the given formatter.
Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.