pub enum PrivateCredential {
Key {
privkey: KeypairData,
comment: String,
},
Cert {
algorithm: Algorithm,
certificate: Box<Certificate>,
privkey: PrivateKeyData,
comment: String,
},
}Expand description
A container for a public / private key pair, or a certificate / private key.
When adding an identity to an agent, a user can provide either:
- A public / private key pair
- An OpenSSH certificate
This structure covers both types of identities a user may
send to an agent as part of a Request::AddIdentity message.
Variants§
Key
A public/private key pair
Cert
An OpenSSH certificate
Trait Implementations§
Source§impl Clone for PrivateCredential
impl Clone for PrivateCredential
Source§fn clone(&self) -> PrivateCredential
fn clone(&self) -> PrivateCredential
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PrivateCredential
impl Debug for PrivateCredential
Source§impl Decode for PrivateCredential
impl Decode for PrivateCredential
Source§impl Encode for PrivateCredential
impl Encode for PrivateCredential
Source§fn encoded_len(&self) -> Result<usize>
fn encoded_len(&self) -> Result<usize>
Get the length of this type encoded in bytes, prior to Base64 encoding.
Source§fn encode(&self, writer: &mut impl Writer) -> Result<()>
fn encode(&self, writer: &mut impl Writer) -> Result<()>
Encode this value using the provided
Writer.Source§fn encoded_len_prefixed(&self) -> Result<usize, Error>
fn encoded_len_prefixed(&self) -> Result<usize, Error>
Return the length of this type after encoding when prepended with a
uint32 length prefix.Source§fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode_prefixed(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value, first prepending a
uint32 length prefix
set to Encode::encoded_len.Source§impl PartialEq for PrivateCredential
impl PartialEq for PrivateCredential
Source§fn eq(&self, other: &PrivateCredential) -> bool
fn eq(&self, other: &PrivateCredential) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrivateCredential
Auto Trait Implementations§
impl Freeze for PrivateCredential
impl RefUnwindSafe for PrivateCredential
impl Send for PrivateCredential
impl Sync for PrivateCredential
impl Unpin for PrivateCredential
impl UnsafeUnpin for PrivateCredential
impl UnwindSafe for PrivateCredential
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