pub struct StringsView<'a> { /* private fields */ }Expand description
View into the string table for lazy string lookup.
Implementations§
Source§impl<'a> StringsView<'a>
impl<'a> StringsView<'a>
Sourcepub fn get(&self, id: StringId) -> &'a str
pub fn get(&self, id: StringId) -> &'a str
Get a string by its ID (type-safe access for bytecode references).
Sourcepub fn get_by_index(&self, idx: usize) -> &'a str
pub fn get_by_index(&self, idx: usize) -> &'a str
Get a string by raw index (for iteration/dumps, including easter egg at 0).
The string table contains sequential u32 offsets. To get string i:
start = table[i], end = table[i+1], length = end - start.
Auto Trait Implementations§
impl<'a> Freeze for StringsView<'a>
impl<'a> RefUnwindSafe for StringsView<'a>
impl<'a> Send for StringsView<'a>
impl<'a> Sync for StringsView<'a>
impl<'a> Unpin for StringsView<'a>
impl<'a> UnwindSafe for StringsView<'a>
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