(&self)
| 148 | } |
| 149 | |
| 150 | pub fn to_msgpack(&self) -> Result<Vec<u8>> { |
| 151 | let mut normalized = self.clone(); |
| 152 | normalized.version = ATTESTATION_VERSION; |
| 153 | rmp_serde::to_vec_named(&normalized).context("failed to encode attestation as msgpack") |
| 154 | } |
| 155 | |
| 156 | pub fn from_msgpack(bytes: &[u8]) -> Result<Self> { |
| 157 | let value: Self = |