Trait tvix_store::nar::hashing_reader::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§