Struct sshkeys::Curve[][src]

pub struct Curve {
    pub kind: CurveKind,
    pub identifier: &'static str,
}

A type which represents a cryptographic curve.

Fields

kind: CurveKind

The curve kind.

identifier: &'static str

Curve identifier.

Implementations

impl Curve[src]

pub fn from_identifier(id: &str) -> Result<Curve>[src]

Creates a new Curve from the given identifier.

Example

let curve = sshkeys::Curve::from_identifier("nistp256").unwrap();
assert_eq!(curve.kind, sshkeys::CurveKind::Nistp256);

Trait Implementations

impl Debug for Curve[src]

impl PartialEq<Curve> for Curve[src]

impl StructuralPartialEq for Curve[src]

Auto Trait Implementations

impl RefUnwindSafe for Curve

impl Send for Curve

impl Sync for Curve

impl Unpin for Curve

impl UnwindSafe for Curve

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.