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

Method to_postcard_bytes

atomic-core/src/change/format_v3/sections.rs:280–282  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Calls

no outgoing calls