pub struct StringsMemory {
pub payload_bytes: usize,
pub text_slots_bytes: usize,
pub index_entries_bytes: usize,
pub index_capacity: usize,
pub strings: usize,
}Expand description
Known storage and opaque index capacity of an append-only string table.
Text payload is counted once, even though the index, text vector and callers
share each string. Arc control blocks, allocator overhead and the physical
HashMap bucket allocation are not exposed by stable standard-library APIs.
The rank index (Strings::ranks), which heaps share, is not counted.
Fields§
§payload_bytes: usizeUnique UTF-8 payload bytes, excluding Arc control blocks.
text_slots_bytes: usizeAllocated text-vector slots, including unused capacity.
index_entries_bytes: usizeLive index key/value object bytes, excluding padding and vacant buckets.
index_capacity: usizeLogical HashMap capacity; this is not a physical bucket-byte count.
strings: usizeUnique strings retained by the table.
Implementations§
Source§impl StringsMemory
impl StringsMemory
Sourcepub fn known_retained_bytes(self) -> Option<usize>
pub fn known_retained_bytes(self) -> Option<usize>
A lower bound on dynamic retained bytes, or None on arithmetic overflow.
The containing Strings object itself is excluded.