pub struct VersionedKey {
pub key: SecretKey,
pub metadata: KeyMetadata,
}Expand description
A versioned key with metadata
Fields§
§key: SecretKeyThe secret key material
metadata: KeyMetadataMetadata about this key
Implementations§
Source§impl VersionedKey
impl VersionedKey
Sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Check if this key has expired
Sourcepub fn can_encrypt(&self) -> bool
pub fn can_encrypt(&self) -> bool
Check if this key can be used for encryption/signing
Sourcepub fn can_decrypt(&self) -> bool
pub fn can_decrypt(&self) -> bool
Check is this key can be used for decryption/verification
Trait Implementations§
Source§impl Clone for VersionedKey
impl Clone for VersionedKey
Source§fn clone(&self) -> VersionedKey
fn clone(&self) -> VersionedKey
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 VersionedKey
impl RefUnwindSafe for VersionedKey
impl Send for VersionedKey
impl Sync for VersionedKey
impl Unpin for VersionedKey
impl UnwindSafe for VersionedKey
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