Skip to content

ludus::foundation::StringTableConfig

Ludus Wiki · API overview · Browse API

Struct

Budgets, hash policy and spelling rules copied into a table by CreateTable.
The defaults are trusted-input settings. Settings cannot change after creation.

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

#include <ludus/foundation/strings/string_table.hpp>
struct ludus::foundation::StringTableConfig final

Fields

MaxSpellingBytes

usize ludus::foundation::StringTableConfig::MaxSpellingBytes {4096}
Largest accepted spelling in bytes, excluding the terminator the table stores after each spelling. Longer TryIntern/TryFind input fails with TooLarge. Must be below half the usize range.

Related types: usize

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

MaxEntries

uint32 ludus::foundation::StringTableConfig::MaxEntries {65536}
includes empty entry at index zero

Related types: uint32

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

MaxAllocatedBytes

usize ludus::foundation::StringTableConfig::MaxAllocatedBytes {usize{8} * 1024 * 1024}
includes rehash/growth peak

Related types: usize

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

HashPolicy

StringHashPolicy ludus::foundation::StringTableConfig::HashPolicy {StringHashPolicy::Trusted}
Lookup hash policy; a value outside the enumerators makes CreateTable fail.

Related types: StringHashPolicy

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

Key

SipHashKey ludus::foundation::StringTableConfig::Key {}
SipHash key used only by StringHashPolicy::Untrusted; copied into the table's storage.

Related types: SipHashKey

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

HasSecretKey

bool ludus::foundation::StringTableConfig::HasSecretKey {}
caller acquired a secret from platform entropy

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

RequireUtf8

bool ludus::foundation::StringTableConfig::RequireUtf8 {true}
Reject spellings that are not well-formed UTF-8 with InvalidUtf8. False accepts arbitrary bytes.

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp

RejectEmbeddedZero

bool ludus::foundation::StringTableConfig::RejectEmbeddedZero {true}
Reject spellings containing a zero byte with EmbeddedZero. Checked before UTF-8 validation.

Declared in modules/foundation/strings/include/ludus/foundation/strings/string_table.hpp