Write an attestation to a writer (e.g., a file).
(&self, writer: &mut W)
| 485 | |
| 486 | /// Write an attestation to a writer (e.g., a file). |
| 487 | pub fn write_to<W: Write>(&self, writer: &mut W) -> Result<Hash, AttestationError> { |
| 488 | let data = self.serialize()?; |
| 489 | let hash = Hash::of(&data); |
| 490 | writer.write_all(&data).map_err(AttestationError::Io)?; |
| 491 | Ok(hash) |
| 492 | } |
| 493 | |
| 494 | /// Check whether a byte slice looks like an attestation file. |
| 495 | /// |
no test coverage detected