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

Function payload

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

Source from the content-addressed store, hash-verified

60}
61
62fn payload<'a>(bytes: Option<&'a pb::VersionedBytes>, schema: &str) -> Result<&'a [u8], String> {
63 let bytes = bytes.ok_or_else(|| format!("missing {schema} payload"))?;
64 if bytes.schema != schema {
65 return Err(format!("expected {schema}, got '{}'", bytes.schema));
66 }
67 Ok(&bytes.payload)
68}
69
70/// A view as the handlers name it.
71pub 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