pub struct VersionedKey {
pub version: u32,
pub key: EncryptionKey,
pub created_at: u64,
pub active: bool,
}Expand description
Versioned key for key rotation support.
Fields§
§version: u32Key version number
key: EncryptionKeyThe encryption key
created_at: u64When this key was created (Unix timestamp)
active: boolWhether this key is active for new encryptions
Implementations§
Source§impl VersionedKey
impl VersionedKey
Sourcepub fn new(version: u32, key: EncryptionKey) -> Self
pub fn new(version: u32, key: EncryptionKey) -> Self
Create a new versioned key.
Trait Implementations§
Source§impl Clone for VersionedKey
impl Clone for VersionedKey
Source§fn clone(&self) -> VersionedKey
fn clone(&self) -> VersionedKey
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 moreAuto Trait Implementations§
impl Freeze for VersionedKey
impl RefUnwindSafe for VersionedKey
impl Send for VersionedKey
impl Sync for VersionedKey
impl Unpin for VersionedKey
impl UnsafeUnpin for VersionedKey
impl UnwindSafe for VersionedKey
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