pub struct Key { /* private fields */ }Expand description
A key which is either a private or public key.
Implementations§
Source§impl Key
impl Key
pub fn key_type(&self) -> KeyType
pub fn from_bare_key( kid: Option<String>, key: BareKey, ) -> Result<Self, KeyError>
pub fn from_bare_private_key( kid: Option<String>, key: BarePrivateKey, ) -> Result<Self, KeyError>
pub fn from_bare_public_key( kid: Option<String>, key: BarePublicKey, ) -> Result<Self, KeyError>
Trait Implementations§
Source§impl From<PrivateKey> for Key
impl From<PrivateKey> for Key
Source§fn from(key: PrivateKey) -> Self
fn from(key: PrivateKey) -> 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