MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / wire_hash_base32

Function wire_hash_base32

atomic-cli/src/commands/rpc.rs:525–530  ·  view source on GitHub ↗

The Base32 form of a wire `Hash` (the local path's `Hash::to_base32`).

(hash: &Option<pb::Hash>)

Source from the content-addressed store, hash-verified

523
524/// The Base32 form of a wire `Hash` (the local path's `Hash::to_base32`).
525fn wire_hash_base32(hash: &Option<pb::Hash>) -> String {
526 hash.as_ref()
527 .and_then(|h| h.value.clone().try_into().ok())
528 .map(|bytes| Merkle(bytes).to_base32())
529 .unwrap_or_default()
530}
531
532// ---------------------------------------------------------------------------
533// add / record

Callers 2

logFunction · 0.85

Calls 5

MerkleClass · 0.85
as_refMethod · 0.80
okMethod · 0.45
cloneMethod · 0.45
to_base32Method · 0.45

Tested by

no test coverage detected