silk/static_text
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc.
Deterministic byte inspection for text available during static evaluation.
Details
These operations inspect UTF-8 bytes without exposing compiler storage. They are available only to static functions and produce finite static values.
Import as StaticText with import silk.static_text { StaticText }.
Public declarations: 1.
StaticText
pub struct StaticTextThe scope for StaticText operations.
Details
This owner carries no data. Select it with import silk.static_text { StaticText }
to access its inherent operations.
Associated function StaticText.byteLength
pub static fn byteLength<'life0>(static value: string<'life0>) -> usizeReturns the UTF-8 byte length of value during static evaluation.
Associated function StaticText.byteAt
pub static fn byteAt<'life0>(static value: string<'life0>, static index: usize) -> u8Returns one UTF-8 byte at index, or reports a static phase violation when out of bounds.
Associated function StaticText.concat
pub static fn concat<'life0, 'life1>(static left: string<'life0>, static right: string<'life1>) -> string<'static>Concatenates two static texts and retains left as the source anchor for diagnostics.
Associated function StaticText.slice
pub static fn slice<'life0>(static value: string<'life0>, static start: usize, static end: usize) -> string<'static>Returns the UTF-8 byte range start..end when both boundaries are scalar boundaries.