Serialize this payload to postcard bytes. This is a convenience wrapper around [`postcard::to_allocvec`]. The caller typically compresses the result with zstd before passing it to the writer. # Errors Returns [`super::error::FormatError::Postcard`] if serialization fails.
(&self)
| 278 | /// |
| 279 | /// Returns [`super::error::FormatError::Postcard`] if serialization fails. |
| 280 | pub fn to_postcard_bytes(&self) -> FormatResult<Vec<u8>> { |
| 281 | Ok(postcard::to_allocvec(self)?) |
| 282 | } |
| 283 | |
| 284 | /// Deserialize a payload from postcard bytes. |
| 285 | /// |
no outgoing calls