Skip to main content

Module table

Module table 

Source
Expand description

Immutable pool storage and iteration. Immutable string storage backed by one byte buffer and one offset table.

The layout is:

  • bytes: all UTF-8 string bytes concatenated
  • offsets: start offset for each string, plus one final sentinel
  • strings are not NUL-terminated by default; boundaries come from offsets

For n strings, offsets.len() == n + 1. String i is bytes[offsets[i]..offsets[i + 1]].

Structs§

StringTable
Immutable string storage.
StringTableIter
Iterator returned by StringTable::iter.

Type Aliases§

StringPool
Alias for StringTable.
StringPoolIter
Alias for StringTableIter.