pub struct KeyVersion(/* private fields */);Expand description
Key version for backward compatibility and migration. Allows different key formats to coexist during transitions.
Version 0 represents no explicit version (backward compatible with existing keys). Format: prefix{sep}env{sep}base64[.checksum]
Versions 1+ will have version between prefix and environment: Format: prefix{sep}v{N}{sep}env{sep}base64[.checksum]
Implementations§
Source§impl KeyVersion
impl KeyVersion
Sourcepub const fn is_versioned(&self) -> bool
pub const fn is_versioned(&self) -> bool
Returns true if this version should be included in the key
Trait Implementations§
Source§impl Clone for KeyVersion
impl Clone for KeyVersion
Source§fn clone(&self) -> KeyVersion
fn clone(&self) -> KeyVersion
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 KeyVersion
impl Debug for KeyVersion
Source§impl Default for KeyVersion
impl Default for KeyVersion
Source§impl Display for KeyVersion
impl Display for KeyVersion
Source§impl Hash for KeyVersion
impl Hash for KeyVersion
Source§impl Ord for KeyVersion
impl Ord for KeyVersion
Source§fn cmp(&self, other: &KeyVersion) -> Ordering
fn cmp(&self, other: &KeyVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for KeyVersion
impl PartialEq for KeyVersion
Source§impl PartialOrd for KeyVersion
impl PartialOrd for KeyVersion
impl Copy for KeyVersion
impl Eq for KeyVersion
impl StructuralPartialEq for KeyVersion
Auto Trait Implementations§
impl Freeze for KeyVersion
impl RefUnwindSafe for KeyVersion
impl Send for KeyVersion
impl Sync for KeyVersion
impl Unpin for KeyVersion
impl UnwindSafe for KeyVersion
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