pub struct RotationPolicy {
pub max_age_seconds: u64,
pub auto_rotate: bool,
}Expand description
Key rotation policy
Fields§
§max_age_seconds: u64Maximum key age in seconds before rotation required
auto_rotate: boolAutomatically rotate keys when max age is reached
Implementations§
Source§impl RotationPolicy
impl RotationPolicy
Sourcepub fn ninety_days() -> Self
pub fn ninety_days() -> Self
Create policy with 90-day rotation
Sourcepub fn thirty_days() -> Self
pub fn thirty_days() -> Self
Create policy with 30-day rotation
Sourcepub fn custom_days(days: u64) -> Self
pub fn custom_days(days: u64) -> Self
Create policy with custom days
Sourcepub fn with_auto_rotate(self) -> Self
pub fn with_auto_rotate(self) -> Self
Enable auto-rotation
Sourcepub fn needs_rotation(&self, metadata: &KeyMetadata) -> bool
pub fn needs_rotation(&self, metadata: &KeyMetadata) -> bool
Check if key needs rotation
Trait Implementations§
Source§impl Clone for RotationPolicy
impl Clone for RotationPolicy
Source§fn clone(&self) -> RotationPolicy
fn clone(&self) -> RotationPolicy
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 RotationPolicy
impl RefUnwindSafe for RotationPolicy
impl Send for RotationPolicy
impl Sync for RotationPolicy
impl Unpin for RotationPolicy
impl UnwindSafe for RotationPolicy
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