MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / key_string

Method key_string

chain/src/storage.rs:76–78  ·  view source on GitHub ↗
(key: K)

Source from the content-addressed store, hash-verified

74 }
75
76 pub(crate) fn key_string<K: AsRef<[u8]>>(key: K) -> String {
77 String::from_utf8(key.as_ref().to_vec()).unwrap_or_else(|_| "UNKNOWN".into())
78 }
79
80 fn path(database_name: &str) -> PathBuf {
81 Path::new(PATH).join(database_name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected