pub struct KeyType {
    pub name: &'static str,
    pub short_name: &'static str,
    pub is_cert: bool,
    pub is_sk: bool,
    pub kind: KeyTypeKind,
    pub plain: &'static str,
}
Expand description

KeyType represents the type of an OpenSSH key.

Fields

name: &'static str

Name of the key type.

short_name: &'static str

Short name of the key type.

is_cert: bool

Indicates whether the key type represents a certificate or not.

is_sk: bool

Indicates whether the key type is used with a security key or not

kind: KeyTypeKind

Kind of the key type.

plain: &'static str

The cert-less equivalent to a certified key type.

Implementations

Creates a new KeyType from a given name.

Example
let kt = sshkeys::KeyType::from_name("ssh-rsa").unwrap();
assert_eq!(kt.kind, sshkeys::KeyTypeKind::Rsa);

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.