MCPcopy Create free account
hub / github.com/RustCrypto/utils / new

Method new

digest-io/src/reader.rs:13–15  ·  view source on GitHub ↗

Construct a new `HashReader` given an existing `reader` by value.

(reader: R)

Source from the content-addressed store, hash-verified

11impl<D: Digest, R: io::Read> HashReader<D, R> {
12 /// Construct a new `HashReader` given an existing `reader` by value.
13 pub fn new(reader: R) -> Self {
14 Self::new_from_parts(D::new(), reader)
15 }
16
17 /// Construct a new `HashReader` given an existing `hasher` and `reader` by value.
18 pub fn new_from_parts(hasher: D, reader: R) -> Self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected