Encodes the [`RawSpanBatch`] into a writer.
(&self, w: &mut dyn bytes::BufMut)
| 26 | |
| 27 | /// Encodes the [`RawSpanBatch`] into a writer. |
| 28 | pub fn encode(&self, w: &mut dyn bytes::BufMut) -> Result<(), SpanBatchError> { |
| 29 | self.prefix.encode_prefix(w); |
| 30 | self.payload.encode_payload(w) |
| 31 | } |
| 32 | |
| 33 | /// Decodes the [`RawSpanBatch`] from a reader.] |
| 34 | pub fn decode(r: &mut &[u8]) -> Result<Self, SpanBatchError> { |