Deserialize the payload from postcard format. Convenience wrapper around [`postcard::from_bytes`] that handles the error conversion. # Type Parameters `T` - The target type, must implement `serde::Deserialize`. # Errors - `FormatError::Postcard` if deserialization fails. # Examples ```rust,ignore use atomic_core::change::ChangeHeader; let header: ChangeHeader = section.deserialize()?; ```
(&'de self)
| 156 | /// let header: ChangeHeader = section.deserialize()?; |
| 157 | /// ``` |
| 158 | pub fn deserialize<'de, T: serde::Deserialize<'de>>(&'de self) -> FormatResult<T> { |
| 159 | Ok(postcard::from_bytes(&self.payload)?) |
| 160 | } |
| 161 | |
| 162 | /// Returns `true` if this is a hashed section (contributes to content hash). |
| 163 | #[inline] |
no outgoing calls