MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / encode

Function encode

gateway/src/kv/mod.rs:369–371  ·  view source on GitHub ↗
(value: &T)

Source from the content-addressed store, hash-verified

367}
368
369pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>> {
370 rmp_serde::encode::to_vec(value).context("failed to encode value")
371}
372
373pub fn decode<T: for<'de> Deserialize<'de>>(bytes: &[u8]) -> Result<T> {
374 rmp_serde::decode::from_slice(bytes).context("failed to decode value")

Callers 15

fmtMethod · 0.85
attest_keysFunction · 0.85
verify_quoted_keyMethod · 0.85
run_one_shotFunction · 0.85
hex_sha256Function · 0.85
cmd_randFunction · 0.85
validateMethod · 0.85
verify_appMethod · 0.85
setup_fsMethod · 0.85

Calls

no outgoing calls