Trait PrivateKey

Source
pub trait PrivateKey:
    Clone
    + Debug
    + Serialize
    + DeserializeOwned {
    // Required methods
    fn to_bytes(&self) -> Vec<u8> ;
    fn sign(&self, data_hash: &[u8]) -> Result<MessageSignature, &'static str>;
}

Required Methods§

Source

fn to_bytes(&self) -> Vec<u8>

Source

fn sign(&self, data_hash: &[u8]) -> Result<MessageSignature, &'static str>

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.

Implementors§