pub enum ChecksumError {
CanonicalJsonFailed(Error),
NonCanonicalContent {
reason: String,
},
}Expand description
Errors surfaced by checksum compute / verify.
Variants§
CanonicalJsonFailed(Error)
serde_json rejected the frame body — typically a non-serializable
payload (e.g. a Map with non-string keys, an f64::NAN).
NonCanonicalContent
Frame body contains content that cannot round-trip cross-impl through
canonical JSON. Specifically: non-ASCII object keys (JS sorts by UTF-16
code-unit order; Rust BTreeMap sorts by UTF-8 byte order — these
diverge for keys containing surrogate-pair code points), or subnormal
f64 values (JS JSON.stringify and Rust serde_json via ryu may
diverge on denormalized floats). Banned at the WAL encode boundary
(B1 — option a) rather than allowed-with-silent-divergence.
Trait Implementations§
Source§impl Debug for ChecksumError
impl Debug for ChecksumError
Source§impl Display for ChecksumError
impl Display for ChecksumError
Source§impl Error for ChecksumError
impl Error for ChecksumError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ChecksumError> for StorageError
Convenience: wal_frame_checksum / verify_wal_frame_checksum failures
bubble through ? at the tier-flush boundary without explicit mapping.
ChecksumError::CanonicalJsonFailed was a serde_json::Error at root,
which is a codec-encode failure — funnel through the Codec variant.
ChecksumError::NonCanonicalContent (B1, 2026-05-22) is a writer-side
rejection of cross-impl-divergent content (non-ASCII keys, subnormal
floats); also routed through Codec::Encode since it’s an encode-time
failure surfaced from the same checksum codepath.
impl From<ChecksumError> for StorageError
Convenience: wal_frame_checksum / verify_wal_frame_checksum failures
bubble through ? at the tier-flush boundary without explicit mapping.
ChecksumError::CanonicalJsonFailed was a serde_json::Error at root,
which is a codec-encode failure — funnel through the Codec variant.
ChecksumError::NonCanonicalContent (B1, 2026-05-22) is a writer-side
rejection of cross-impl-divergent content (non-ASCII keys, subnormal
floats); also routed through Codec::Encode since it’s an encode-time
failure surfaced from the same checksum codepath.