Hashable

Trait Hashable 

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

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

Required Methods§

Source

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

Content to bytes for calclating hash.

Provided Methods§

Source

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

Content to hash by sha1 hash function.

Implementors§