[−][src]Struct osshkeys::keys::PublicKey
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
pub fn serialize(&self) -> OsshResult<String>
[src]
Get the string presentation of the public key
Trait Implementations
impl Display for PublicKey
[src]
impl From<DsaPublicKey> for PublicKey
[src]
fn from(inner: DsaPublicKey) -> PublicKey
[src]
impl From<EcDsaPublicKey> for PublicKey
[src]
fn from(inner: EcDsaPublicKey) -> PublicKey
[src]
impl From<Ed25519PublicKey> for PublicKey
[src]
fn from(inner: Ed25519PublicKey) -> PublicKey
[src]
impl From<RsaPublicKey> for PublicKey
[src]
fn from(inner: RsaPublicKey) -> PublicKey
[src]
impl Key for PublicKey
[src]
impl PublicParts for PublicKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,