(&self)
| 41 | |
| 42 | impl 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 { |
no outgoing calls