Trait ToEncodableKey

Source
pub trait ToEncodableKey: From<Self::KeyPair> {
    type Key: EncodableItem + 'static + From<<Self::KeyPair as ToEncodableKey>::Key>;
    type KeyPair: ToEncodableKey;

    // Required methods
    fn to_encodable_key(self) -> Self::Key;
    fn from_encodable_key(key: Self::Key) -> Self;
}
Expand description

A key that can be converted to an EncodableItem.

Required Associated Types§

Source

type Key: EncodableItem + 'static + From<<Self::KeyPair as ToEncodableKey>::Key>

The key type this can be converted to/from.

Source

type KeyPair: ToEncodableKey

The KeyPair (secret+public) of which this key is a subset. For secret keys, this type is Self. For public keys, this type is the corresponding (secret) keypair.

The associated type constraint (where) expresses the fact that a public key is always derivable from its corresponding secret key.

Required Methods§

Source

fn to_encodable_key(self) -> Self::Key

Convert this key to a type that implements EncodableItem.

Source

fn from_encodable_key(key: Self::Key) -> Self

Convert an EncodableItem to another key type.

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 ToEncodableKey for HsBlindIdKey

Source§

impl ToEncodableKey for HsBlindIdKeypair

Source§

impl ToEncodableKey for HsClientDescEncKeypair

Source§

impl ToEncodableKey for HsDescSigningKeypair

Source§

impl ToEncodableKey for HsIdKey

Source§

impl ToEncodableKey for HsIdKeypair

Source§

impl ToEncodableKey for HsIntroPtSessionIdKeypair

Source§

impl ToEncodableKey for HsSvcNtorKeypair

Implementors§