Skip to main content

ToEncodableKey

Trait ToEncodableKey 

Source
pub trait ToEncodableKey: From<Self::KeyPair>
where Self::Key: From<Self::KeyPair::Key>,
{ type Key: EncodableItem + 'static; 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

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".

Implementors§