MCPcopy Create free account
hub / github.com/cosdata/cosdata / deserialize

Method deserialize

src/models/tree_map.rs:569–587  ·  view source on GitHub ↗
(
        dim_bufman: BufferManager,
        data_bufmans: BufferManagerFactory<VersionNumber>,
    )

Source from the content-addressed store, hash-verified

567 }
568
569 pub fn deserialize(
570 dim_bufman: BufferManager,
571 data_bufmans: BufferManagerFactory<VersionNumber>,
572 ) -> Result<Self, BufIoError> {
573 let cursor = dim_bufman.open_cursor()?;
574 let offset = dim_bufman.read_u32_with_cursor(cursor)?;
575 dim_bufman.close_cursor(cursor)?;
576 Ok(Self {
577 root: TreeMapNode::deserialize(
578 &dim_bufman,
579 &data_bufmans,
580 FileOffset(offset),
581 VersionNumber::from(u32::MAX), // not used
582 )?,
583 dim_bufman,
584 data_bufmans,
585 _marker: PhantomData,
586 })
587 }
588}
589
590impl<K: TreeMapKey, V: VersionedVecItem> TreeMapVec<K, V> {

Callers

nothing calls this directly

Calls 4

FileOffsetClass · 0.85
open_cursorMethod · 0.80
read_u32_with_cursorMethod · 0.80
close_cursorMethod · 0.80

Tested by

no test coverage detected