pub struct LocalHeapImage { /* private fields */ }Expand description
A local heap’s data segment, built up object by object.
This is the bulk-load half of H5HL_insert: every object is placed at the
end of the block and the block grows to fit, which is what that function
does once its free list is empty. The free list itself is not modelled —
the writer rebuilds a group’s heap whole rather than patching the one on
disk, so there is never a hole to record.
Implementations§
Source§impl LocalHeapImage
impl LocalHeapImage
Sourcepub fn with_empty_string() -> Self
pub fn with_empty_string() -> Self
A heap holding just the empty string at offset 0.
Not an optimisation: H5G__stab_create_components asserts that offset,
because a symbol-table B-tree’s leftmost key is the empty string and
every comparison against it reads heap offset 0.
Sourcepub fn insert(&mut self, bytes: &[u8]) -> u64
pub fn insert(&mut self, bytes: &[u8]) -> u64
Append bytes (null terminator included) and return its offset.
Sourcepub fn insert_str(&mut self, s: &str) -> u64
pub fn insert_str(&mut self, s: &str) -> u64
Append a name as a null-terminated string, returning its offset.