Skip to main content

Hashable

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>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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