MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / ensure_compatible

Method ensure_compatible

crates/commitlog/src/segment.rs:73–82  ·  view source on GitHub ↗
(&self, max_log_format_version: u8, checksum_algorithm: u8)

Source from the content-addressed store, hash-verified

71 }
72
73 pub fn ensure_compatible(&self, max_log_format_version: u8, checksum_algorithm: u8) -> Result<(), String> {
74 if self.log_format_version > max_log_format_version {
75 return Err(format!("unsupported log format version: {}", self.log_format_version));
76 }
77 if self.checksum_algorithm != checksum_algorithm {
78 return Err(format!("unsupported checksum algorithm: {}", self.checksum_algorithm));
79 }
80
81 Ok(())
82 }
83}
84
85impl Default for Header {

Callers 3

newMethod · 0.80
resume_segment_writerFunction · 0.80
create_and_metadataMethod · 0.80

Calls 2

ErrFunction · 0.50
OkFunction · 0.50

Tested by

no test coverage detected