[][src]Struct osshkeys::keys::PublicKey

pub struct PublicKey { /* fields omitted */ }

General public key type

This is a type to make it easy to store different types of public key in the container. Each can contain one of the types supported in this crate.

Public key is usually stored in the .pub file when generating the key.

Methods

impl PublicKey[src]

pub fn from_keystring(keystr: &str) -> OsshResult<Self>[src]

Parse the openssh public key file

pub fn keytype(&self) -> KeyType[src]

Indicate the key type being stored

pub fn comment(&self) -> &str[src]

Get the comment of the key

pub fn comment_mut(&mut self) -> &mut String[src]

Get the mutable comment of the key

Trait Implementations

impl Key for PublicKey[src]

impl PublicPart for PublicKey[src]

impl From<RsaPublicKey> for PublicKey[src]

impl From<DsaPublicKey> for PublicKey[src]

impl From<EcDsaPublicKey> for PublicKey[src]

impl From<Ed25519PublicKey> for PublicKey[src]

impl Display for PublicKey[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self