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

Function payload

libatomic/src/daemon/sandbox_wire.rs:57–63  ·  view source on GitHub ↗
(bytes: Option<&'a pb::VersionedBytes>, schema: &str)

Source from the content-addressed store, hash-verified

55}
56
57fn payload<'a>(bytes: Option<&'a pb::VersionedBytes>, schema: &str) -> Result<&'a [u8], String> {
58 let bytes = bytes.ok_or_else(|| format!("missing {schema} payload"))?;
59 if bytes.schema != schema {
60 return Err(format!("expected {schema}, got '{}'", bytes.schema));
61 }
62 Ok(&bytes.payload)
63}
64
65/// A view as the handlers name it.
66pub fn view_ref(name: &str) -> pb::ViewRef {

Callers 6

skeleton_from_protoFunction · 0.85
slice_from_protoFunction · 0.85
provenance_graph_fromFunction · 0.85
session_turn_fromFunction · 0.85
publication_fromFunction · 0.85
attestation_fromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected