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

Method reader

nodedb-array/src/segment/reader.rs:345–351  ·  view source on GitHub ↗

Borrow a `SegmentReader` over the owned plaintext bytes.

(&self)

Source from the content-addressed store, hash-verified

343
344 /// Borrow a `SegmentReader` over the owned plaintext bytes.
345 pub fn reader(&self) -> SegmentReader<'_> {
346 SegmentReader {
347 bytes: &self.plaintext,
348 header: self.header,
349 footer: self.footer.clone(),
350 }
351 }
352
353 /// Consume the owned reader and return the inner plaintext buffer.
354 pub fn into_plaintext(self) -> Vec<u8> {

Calls 1

cloneMethod · 0.45