logos.lang.fabric.string_store

Module lang · package logos-lang

Types

structStrDt

struct StrDt

Marker datatype: Buffer<StrDt> stores StringViews in the SoA string store.

Implements: Datatype Container

Methods

fn drop_store(s: *mut WritStringStorage) -> void
fn new_store() -> WritStringStorage
fn store_accepts(s: *const WritStringStorage, v: StringView) -> bool
fn store_get(s: *const WritStringStorage, idx: u64) -> StringView
fn store_insert_at(s: *mut WritStringStorage, idx: u64, v: StringView) -> void
fn store_len(s: *const WritStringStorage) -> u64
fn store_push(s: *mut WritStringStorage, v: StringView) -> void
fn store_remove_at(s: *mut WritStringStorage, idx: u64) -> void
fn store_set(s: *mut WritStringStorage, idx: u64, v: StringView) -> void

structWritStringStorage

struct WritStringStorage

SoA storage for strings: one packed byte buffer plus parallel end offsets. Owns bytes and ends; call storage_drop to free them before dropping the struct.

Implements: Storage OwningStorage DynamicStorage

Fields

b_cap: u64

Allocated capacity of bytes, in bytes.

b_len: u64

Bytes currently used in bytes.

bytes: *mut u8

Packed string bytes, back-to-back with no separators.

ends: *mut u32

Exclusive end offset of each stored string within bytes.

o_cap: u64

Allocated capacity of ends, in elements.

o_len: u64

Number of strings stored (length of ends).

Methods

fn storage_clear(s: *mut WritStringStorage) -> void
fn storage_drop(s: *mut WritStringStorage) -> void
fn storage_get(s: *const WritStringStorage, idx: u64) -> StringView
fn storage_insert_at(s: *mut WritStringStorage, idx: u64, v: StringView) -> void

No-op stub — packed SoA storage can’t insert mid-sequence; call silently leaves the store unchanged.

fn storage_len(s: *const WritStringStorage) -> u64
fn storage_new() -> WritStringStorage
fn storage_push(s: *mut WritStringStorage, v: StringView) -> void
fn storage_remove_at(s: *mut WritStringStorage, idx: u64) -> void

No-op stub — packed SoA storage can’t remove an element; call silently leaves the store unchanged.

fn storage_set(s: *mut WritStringStorage, idx: u64, v: StringView) -> void

No-op stub — packed SoA storage can’t overwrite a string in place; call silently leaves the store unchanged.