Trait FromJwk

Source
pub trait FromJwk: Sized {
    type Error;

    // Required method
    fn from_jwk(jwk: &Jwk) -> Result<Self, Self::Error>;
}
Expand description

Helper trait to convert implementing conversion from Jwk.

Required Associated Types§

Source

type Error

Error type used

Required Methods§

Source

fn from_jwk(jwk: &Jwk) -> Result<Self, Self::Error>

Create instance from Jwk.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromJwk for Ed25519KeyPair

Source§

type Error = Error

Source§

fn from_jwk( jwk: &Jwk, ) -> Result<Ed25519KeyPair, <Ed25519KeyPair as FromJwk>::Error>

Source§

impl FromJwk for Ed25519PublicKey

Source§

type Error = Error

Source§

fn from_jwk( jwk: &Jwk, ) -> Result<Ed25519PublicKey, <Ed25519PublicKey as FromJwk>::Error>

Source§

impl FromJwk for IotaKeyPair

Source§

type Error = Error

Source§

fn from_jwk(jwk: &Jwk) -> Result<IotaKeyPair, <IotaKeyPair as FromJwk>::Error>

Source§

impl FromJwk for PublicKey

Source§

type Error = Error

Source§

fn from_jwk(jwk: &Jwk) -> Result<PublicKey, <PublicKey as FromJwk>::Error>

Source§

impl FromJwk for Secp256k1KeyPair

Source§

type Error = Error

Source§

fn from_jwk( jwk: &Jwk, ) -> Result<Secp256k1KeyPair, <Secp256k1KeyPair as FromJwk>::Error>

Source§

impl FromJwk for Secp256r1KeyPair

Source§

type Error = Error

Source§

fn from_jwk( jwk: &Jwk, ) -> Result<Secp256r1KeyPair, <Secp256r1KeyPair as FromJwk>::Error>

Implementors§