snix_store::nar::hashing_reader

Trait ToHash

Source
trait ToHash: DynDigest + Send {
    // Required method
    fn consume(self: Box<Self>) -> NixHash;
}
Expand description

Utility trait that simplifies digesting different hashes.

The main benefit is that each corresponding impl produces its corresponding NixHash value as opposed to a lower level byte slice.

Required Methods§

Source

fn consume(self: Box<Self>) -> NixHash

Implementations on Foreign Types§

Source§

impl ToHash for Md5

Source§

fn consume(self: Box<Self>) -> NixHash

Source§

impl ToHash for Sha1

Source§

fn consume(self: Box<Self>) -> NixHash

Source§

impl ToHash for Sha256

Source§

fn consume(self: Box<Self>) -> NixHash

Source§

impl ToHash for Sha512

Source§

fn consume(self: Box<Self>) -> NixHash

Implementors§