pub struct InternedString { /* private fields */ }Expand description
A binary-stable, transparent representation of fxt::InternedString.
This structure has the exact same memory layout as the C++ fxt::InternedString
(which is a single const char* pointer pointing to a null-terminated string).
Placing instances of this structure in the special linker section __fxt_interned_string_table
allows them to sit contiguous alongside C++’s own interned strings in the global
string table segment, meaning their trace-ID calculations (this - section_begin)
are safe, exact, and valid.
Implementations§
Source§impl InternedString
impl InternedString
Sourcepub const unsafe fn new_raw(ptr: *const u8) -> Self
pub const unsafe fn new_raw(ptr: *const u8) -> Self
Creates a new InternedString from a raw pointer.
§Safety
The caller must ensure that the pointer points to a null-terminated string with static storage duration (’static).