pub struct SymbolDB { /* private fields */ }Expand description
Global symbol table.
Maps between string representations and numeric IDs so the heap can
work entirely with usize values. Constants, variables, and string
literals are stored separately.
Implementations§
Source§impl SymbolDB
impl SymbolDB
pub fn set_const(symbol: String) -> usize
pub fn set_var(symbol: String, addr: usize, heap_id: usize)
pub fn get_const(id: usize) -> Arc<str>
pub fn get_var(addr: usize, heap_id: usize) -> Option<Arc<str>>
pub fn get_string(index: usize) -> Arc<str>
pub fn set_string(value: String) -> usize
pub fn _see_var_map()
Auto Trait Implementations§
impl Freeze for SymbolDB
impl RefUnwindSafe for SymbolDB
impl Send for SymbolDB
impl Sync for SymbolDB
impl Unpin for SymbolDB
impl UnsafeUnpin for SymbolDB
impl UnwindSafe for SymbolDB
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more