MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / reader

Method reader

nodedb/src/engine/array/store/segment_handle.rs:145–149  ·  view source on GitHub ↗

Build a borrowing `SegmentReader`. The reader must not outlive the handle reference it was built from.

(&self)

Source from the content-addressed store, hash-verified

143 /// Build a borrowing `SegmentReader`. The reader must not outlive
144 /// the handle reference it was built from.
145 pub fn reader(&self) -> SegmentReader<'_> {
146 // Already validated at open time; unwrap is safe because we
147 // hold a live backing buffer of the same bytes that already parsed.
148 SegmentReader::open(self.backing.bytes()).expect("segment validated at open")
149 }
150}
151
152impl std::fmt::Debug for SegmentHandle {

Callers 6

scan_tiles_atMethod · 0.45
runMethod · 0.45
rewrite_segmentFunction · 0.45
planFunction · 0.45

Calls 3

openFunction · 0.50
expectMethod · 0.45
bytesMethod · 0.45

Tested by

no test coverage detected