pub struct KeyMetadata {
pub key_id: String,
pub created_at: u64,
pub expires_at: Option<u64>,
pub algorithm: String,
pub purpose: String,
pub rotation_count: u32,
}Expand description
Key metadata
Fields§
§key_id: String§created_at: u64§expires_at: Option<u64>§algorithm: String§purpose: String§rotation_count: u32Implementations§
Source§impl KeyMetadata
impl KeyMetadata
Sourcepub fn with_expiration(self, seconds: u64) -> Self
pub fn with_expiration(self, seconds: u64) -> Self
Set expiration (seconds from now)
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if key has expired
Sourcepub fn age_seconds(&self) -> u64
pub fn age_seconds(&self) -> u64
Get age in seconds
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 moreSource§impl Debug for KeyMetadata
impl Debug for KeyMetadata
Source§impl<'de> Deserialize<'de> for KeyMetadata
impl<'de> Deserialize<'de> for KeyMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeyMetadata
impl RefUnwindSafe for KeyMetadata
impl Send for KeyMetadata
impl Sync for KeyMetadata
impl Unpin 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