pub struct KeyMetadata {
pub key_id: String,
pub created_at: u64,
pub last_used_at: u64,
pub encrypt_count: u64,
pub decrypt_count: u64,
pub max_lifetime_seconds: u64,
pub max_operations: u64,
pub is_expired: bool,
pub rotated_to: String,
}Expand description
Metadata for a key tracked by the rotation manager
Fields§
§key_id: String§created_at: u64§last_used_at: u64§encrypt_count: u64§decrypt_count: u64§max_lifetime_seconds: u64§max_operations: u64§is_expired: bool§rotated_to: StringImplementations§
Source§impl KeyMetadata
impl KeyMetadata
pub fn total_operations(&self) -> u64
pub fn age_seconds(&self) -> u64
pub fn should_expire(&self) -> bool
pub fn record_encrypt(&mut self)
pub fn record_decrypt(&mut self)
Trait Implementations§
Source§impl Clone for KeyMetadata
impl Clone for KeyMetadata
Source§fn clone(&self) -> KeyMetadata
fn clone(&self) -> KeyMetadata
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 KeyMetadata
impl RefUnwindSafe for KeyMetadata
impl Send for KeyMetadata
impl Sync for KeyMetadata
impl Unpin for KeyMetadata
impl UnsafeUnpin for KeyMetadata
impl UnwindSafe for KeyMetadata
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