pub trait Signable {
    type Hash: AsRef<[u8]>;

    // Required method
    fn hash(&self) -> Self::Hash;
}
Expand description

Data which can be signed.

Signable data should provide a hash of type Self::Hash which is build from all parts of the data which should be signed. The type Self::Hash should implement [AsRef<[u8]>], and the bytes returned by hash.as_ref() are used by a MultiKeychain to sign the data.

Required Associated Types§

Required Methods§

source

fn hash(&self) -> Self::Hash

Return a hash for signing.

Implementors§

source§

impl<T: AsRef<[u8]> + Clone> Signable for T

§

type Hash = T

source§

impl<T: Signable> Signable for Indexed<T>

§

type Hash = <T as Signable>::Hash