pub struct KeyValidator { /* private fields */ }Expand description
Key validator for key rotation and management
Implementations§
Source§impl KeyValidator
impl KeyValidator
Sourcepub fn should_rotate(&self, created_at: DateTime<Utc>) -> bool
pub fn should_rotate(&self, created_at: DateTime<Utc>) -> bool
Check if a key should be rotated based on age
Sourcepub fn days_until_rotation(&self, created_at: DateTime<Utc>) -> i64
pub fn days_until_rotation(&self, created_at: DateTime<Utc>) -> i64
Calculate days until rotation
Sourcepub fn validate_metadata(
&self,
created_at: DateTime<Utc>,
algorithm: &str,
) -> SecurityResult<()>
pub fn validate_metadata( &self, created_at: DateTime<Utc>, algorithm: &str, ) -> SecurityResult<()>
Validate key metadata
Auto Trait Implementations§
impl Freeze for KeyValidator
impl RefUnwindSafe for KeyValidator
impl Send for KeyValidator
impl Sync for KeyValidator
impl Unpin for KeyValidator
impl UnwindSafe for KeyValidator
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