pub struct FileKey(/* private fields */);
Expand description
A file key for encrypting or decrypting an age file.
Implementations§
Source§impl FileKey
impl FileKey
Sourcepub fn init_with_mut(ctr: impl FnOnce(&mut [u8; 16])) -> Self
pub fn init_with_mut(ctr: impl FnOnce(&mut [u8; 16])) -> Self
Creates a file key using a function that can initialize the key in-place.
Sourcepub fn try_init_with_mut<E>(
ctr: impl FnOnce(&mut [u8; 16]) -> Result<(), E>,
) -> Result<Self, E>
pub fn try_init_with_mut<E>( ctr: impl FnOnce(&mut [u8; 16]) -> Result<(), E>, ) -> Result<Self, E>
Same as Self::init_with_mut
, but the constructor can be fallible.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileKey
impl RefUnwindSafe for FileKey
impl Send for FileKey
impl Sync for FileKey
impl Unpin for FileKey
impl UnwindSafe for FileKey
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