(&self, offset: u64)
| 126 | } |
| 127 | |
| 128 | pub fn validate(&self, offset: u64) -> Result<()> { |
| 129 | if self.magic != WAL_MAGIC { |
| 130 | return Err(WalError::InvalidMagic { |
| 131 | offset, |
| 132 | expected: WAL_MAGIC, |
| 133 | actual: self.magic, |
| 134 | }); |
| 135 | } |
| 136 | if self.format_version != WAL_FORMAT_VERSION { |
| 137 | return Err(WalError::UnsupportedVersion { |
| 138 | version: self.format_version, |
| 139 | supported: WAL_FORMAT_VERSION, |
| 140 | }); |
| 141 | } |
| 142 | Ok(()) |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | #[cfg(test)] |
no outgoing calls
no test coverage detected