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

Method from_postcard_bytes

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

Deserialize a payload from postcard bytes. This is a convenience wrapper around [`postcard::from_bytes`]. The caller typically decompresses the section data with zstd before calling this. # Errors Returns [`super::error::FormatError::Postcard`] if deserialization fails.

(bytes: &[u8])

Source from the content-addressed store, hash-verified

291 ///
292 /// Returns [`super::error::FormatError::Postcard`] if deserialization fails.
293 pub fn from_postcard_bytes(bytes: &[u8]) -> FormatResult<Self> {
294 Ok(postcard::from_bytes(bytes)?)
295 }
296
297 /// Consume this payload and return its parts.
298 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected