(&self, mut out: W)
| 38 | pub const LEN: usize = MAGIC.len() + /* log_format_version + checksum_algorithm + reserved + reserved */ 4; |
| 39 | |
| 40 | pub fn write<W: io::Write>(&self, mut out: W) -> io::Result<()> { |
| 41 | out.write_all(&MAGIC)?; |
| 42 | out.write_all(&[self.log_format_version, self.checksum_algorithm, 0, 0])?; |
| 43 | |
| 44 | Ok(()) |
| 45 | } |
| 46 | |
| 47 | pub fn decode<R: io::Read>(mut read: R) -> io::Result<Self> { |
| 48 | let mut buf = [0; Self::LEN]; |