MCPcopy Create free account
hub / github.com/Pometry/Raphtory / inline_view

Function inline_view

raphtory-core/src/storage/string_col.rs:29–39  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

27
28#[inline]
29fn inline_view(bytes: &[u8]) -> Option<u128> {
30 let len = bytes.len();
31 if len <= MAX_INLINE_VIEW_LEN as usize {
32 let mut view_buffer = [0; 16];
33 view_buffer[0..4].copy_from_slice(&(len as u32).to_le_bytes());
34 view_buffer[4..4 + len].copy_from_slice(bytes);
35 Some(u128::from_le_bytes(view_buffer))
36 } else {
37 None
38 }
39}
40
41#[derive(Debug)]
42pub struct StringColBuilder {

Callers 3

update_value_innerMethod · 0.85
try_append_valueMethod · 0.85
upsert_valueMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected