pub struct KeyInfo { /* private fields */ }Expand description
Information about a key.
Returned by Agent::list_keys.
Implementations§
Source§impl KeyInfo
impl KeyInfo
Sourcepub fn serialno(&self) -> Option<&str>
pub fn serialno(&self) -> Option<&str>
Returns the serial number of the smartcard.
If the key is not on a smartcard, this returns None.
Sourcepub fn idstr(&self) -> Option<&str>
pub fn idstr(&self) -> Option<&str>
Returns the key’s identifier on the smartcard.
If the key is not on a smartcard, this returns None.
Example: OPENPGP.1.
Sourcepub fn passphrase_cached(&self) -> bool
pub fn passphrase_cached(&self) -> bool
Returns whether the passphrase for the key was found in the key cache.
Sourcepub fn protection(&self) -> &KeyProtection
pub fn protection(&self) -> &KeyProtection
Returns the key’s protection, if any.
Sourcepub fn ttl(&self) -> Option<u64>
pub fn ttl(&self) -> Option<u64>
Returns the TTL in seconds for the key.
If not available, returns None.
Sourcepub fn key_disabled(&self) -> bool
pub fn key_disabled(&self) -> bool
Returns whether the key has been disabled.
Sourcepub fn in_ssh_control(&self) -> bool
pub fn in_ssh_control(&self) -> bool
Returns whether the key is listed in sshcontrol.
Sourcepub fn confirmation_required(&self) -> bool
pub fn confirmation_required(&self) -> bool
Returns whether use of the key needs to be confirmed.
Trait Implementations§
Source§impl FromIterator<KeyInfo> for KeyInfoList
impl FromIterator<KeyInfo> for KeyInfoList
impl Eq for KeyInfo
impl StructuralPartialEq for KeyInfo
Auto Trait Implementations§
impl Freeze for KeyInfo
impl RefUnwindSafe for KeyInfo
impl Send for KeyInfo
impl Sync for KeyInfo
impl Unpin for KeyInfo
impl UnwindSafe for KeyInfo
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