pub struct InternedSymbolData { /* private fields */ }Expand description
Layout of static interned symbol data from LLVM IR
Matches the LLVM IR structure:
{ ptr, i64 len, i64 capacity, i8 global }
§Safety Contract
This struct must ONLY be constructed by the compiler in static globals. Invariants that MUST hold:
ptrpoints to valid static UTF-8 string data with lifetime'staticlenmatches the actual byte length of the stringcapacityMUST be 0 (marks symbol as interned/static)globalMUST be 1 (marks symbol as static allocation)
Violating these invariants causes undefined behavior (memory corruption, double-free, or null pointer dereference).
Auto Trait Implementations§
impl Freeze for InternedSymbolData
impl RefUnwindSafe for InternedSymbolData
impl !Send for InternedSymbolData
impl !Sync for InternedSymbolData
impl Unpin for InternedSymbolData
impl UnwindSafe for InternedSymbolData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more