MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / encode

Method encode

nodedb-array/src/tile/cell_payload.rs:43–47  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

41
42impl CellPayload {
43 pub fn encode(&self) -> ArrayResult<Vec<u8>> {
44 zerompk::to_msgpack_vec(self).map_err(|e| ArrayError::SegmentCorruption {
45 detail: format!("encode CellPayload: {e}"),
46 })
47 }
48
49 pub fn decode(bytes: &[u8]) -> ArrayResult<Self> {
50 zerompk::from_msgpack(bytes).map_err(|e| ArrayError::SegmentCorruption {

Callers 4

payloadFunction · 0.45

Calls

no outgoing calls