pub enum Key {
WithRaw(KeyWithRaw),
Identity(ArcIdentity),
}Expand description
Represents a cryptographic key that can be either a raw key with its bytes or just an identity.
This enum allows for flexible key handling where sometimes you need access to the raw key material and sometimes you only need the identity interface.
Variants§
WithRaw(KeyWithRaw)
A key that includes both raw key bytes and the identity
Identity(ArcIdentity)
A key that only provides the identity interface without raw bytes
Implementations§
Trait Implementations§
Source§impl From<&ArcIdentity> for Key
impl From<&ArcIdentity> for Key
Source§fn from(identity: &ArcIdentity) -> Self
fn from(identity: &ArcIdentity) -> Self
Converts to this type from the input type.
Source§impl From<&Key> for ArcIdentity
impl From<&Key> for ArcIdentity
Source§impl From<ArcIdentity> for Key
impl From<ArcIdentity> for Key
Source§fn from(identity: ArcIdentity) -> Self
fn from(identity: ArcIdentity) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Key
impl !RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl !UnwindSafe for Key
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