pub enum PrivateKeyData {
Decrypted(PrivateKeys),
Encrypted(Envelope),
}Expand description
Private key data that can be either decrypted or encrypted.
Variants§
Decrypted(PrivateKeys)
Decrypted private keys that can be used for signing/decryption.
Encrypted(Envelope)
Encrypted private key envelope that cannot be used without decryption. This preserves the encrypted assertion when a document is loaded without the decryption password.
Note: Envelope uses internal reference counting (Rc/Arc) so cloning is cheap - no need for additional wrapper.
Trait Implementations§
Source§impl Clone for PrivateKeyData
impl Clone for PrivateKeyData
Source§fn clone(&self) -> PrivateKeyData
fn clone(&self) -> PrivateKeyData
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 PrivateKeyData
impl Debug for PrivateKeyData
Source§impl PartialEq for PrivateKeyData
impl PartialEq for PrivateKeyData
impl Eq for PrivateKeyData
Auto Trait Implementations§
impl Freeze for PrivateKeyData
impl RefUnwindSafe for PrivateKeyData
impl Send for PrivateKeyData
impl Sync for PrivateKeyData
impl Unpin for PrivateKeyData
impl UnwindSafe for PrivateKeyData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more