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

Method segment

crates/paths/src/server.rs:264–267  ·  view source on GitHub ↗

By convention, the file name of a segment consists of the minimum transaction offset contained in it, left-padded with zeroes to 20 digits, and the file extension `.stdb.log`.

(&self, offset: u64)

Source from the content-addressed store, hash-verified

262 /// transaction offset contained in it, left-padded with zeroes to 20 digits,
263 /// and the file extension `.stdb.log`.
264 pub fn segment(&self, offset: u64) -> SegmentFile {
265 let file_name = format!("{offset:0>20}.stdb.log");
266 SegmentFile(self.0.join(file_name))
267 }
268
269 /// Returns the offset index file path based on the root path and offset
270 pub fn index(&self, offset: u64) -> OffsetIndexFile {

Callers 1

segment_pathMethod · 0.80

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected