Trait Hashable

Source
pub trait Hashable {
    // Required method
    fn bytes(&self) -> Vec<u8> ;

    // Provided method
    fn hash(&self) -> Vec<u8>  { ... }
}
Expand description

sha-256 means generate 32 byte hash

Required Methods§

Source

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

Provided Methods§

Source

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

Implementors§

Source§

impl Hashable for Block

Concatenate together all the bytes

Generate unique data fingerprint: the hash

Source§

impl Hashable for Amount

Source§

impl Hashable for Transaction