pub trait SignedMessage {
    // Required methods
    fn bytes_to_sign(&self) -> Vec<u8>;
    fn sign(&mut self, key: PrivateKey) -> Result<(), SigningError>;

    // Provided method
    fn sign_message(&self, key: PrivateKey) -> Result<Signature, SigningError> { ... }
}
Expand description

Trait to be implemented by the messages that have to be signed before being sent.

Required Methods§

source

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

source

fn sign(&mut self, key: PrivateKey) -> Result<(), SigningError>

Provided Methods§

Implementors§