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

Method deserialize

src/models/serializer/mod.rs:90–102  ·  view source on GitHub ↗
(
        bufman: &BufferManager,
        FileOffset(offset): FileOffset,
    )

Source from the content-addressed store, hash-verified

88 }
89
90 fn deserialize(
91 bufman: &BufferManager,
92 FileOffset(offset): FileOffset,
93 ) -> Result<Self, BufIoError>
94 where
95 Self: Sized,
96 {
97 let cursor = bufman.open_cursor()?;
98 bufman.seek_with_cursor(cursor, offset as u64)?;
99 let res = bufman.read_u16_with_cursor(cursor)?;
100 bufman.close_cursor(cursor)?;
101 Ok(res)
102 }
103}
104
105impl SimpleSerialize for InternalId {

Callers

nothing calls this directly

Calls 9

open_cursorMethod · 0.80
seek_with_cursorMethod · 0.80
read_u16_with_cursorMethod · 0.80
close_cursorMethod · 0.80
read_u32_with_cursorMethod · 0.80
read_u64_with_cursorMethod · 0.80
read_f32_with_cursorMethod · 0.80
read_with_cursorMethod · 0.80
read_stringFunction · 0.70

Tested by

no test coverage detected