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

Method new

crates/commitlog/src/segment.rs:316–325  ·  view source on GitHub ↗
(head: TxOffsetIndexMut, opts: Options)

Source from the content-addressed store, hash-verified

314
315impl OffsetIndexWriter {
316 pub fn new(head: TxOffsetIndexMut, opts: Options) -> Self {
317 OffsetIndexWriter {
318 head,
319 require_segment_fsync: opts.offset_index_require_segment_fsync,
320 min_write_interval: opts.offset_index_interval_bytes,
321 candidate_min_tx_offset: TxOffset::default(),
322 candidate_byte_offset: 0,
323 bytes_since_last_index: 0,
324 }
325 }
326
327 fn reset(&mut self) {
328 self.candidate_byte_offset = 0;

Callers

nothing calls this directly

Calls 4

decodeFunction · 0.85
ensure_compatibleMethod · 0.80
newFunction · 0.50
OkFunction · 0.50

Tested by

no test coverage detected