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

Method is_empty

crates/commitlog/src/segment.rs:206–208  ·  view source on GitHub ↗

`true` if the segment contains no commits. The segment will, however, contain a header. This thus violates the convention that `is_empty == (len == 0)`.

(&self)

Source from the content-addressed store, hash-verified

204 /// The segment will, however, contain a header. This thus violates the
205 /// convention that `is_empty == (len == 0)`.
206 pub fn is_empty(&self) -> bool {
207 self.bytes_written <= Header::LEN as u64
208 }
209
210 /// Number of bytes written to this segment, including the header.
211 pub fn len(&self) -> u64 {

Callers 15

openMethod · 0.45
min_committed_offsetMethod · 0.45
extractMethod · 0.45
resume_empty_segmentFunction · 0.45
generate_reducer_fileMethod · 0.45
print_reducer_enum_defnFunction · 0.45
generate_reducer_fileMethod · 0.45

Calls

no outgoing calls

Tested by 1

resume_empty_segmentFunction · 0.36