pub struct VariableMap { /* private fields */ }Implementations§
Source§impl VariableMap
impl VariableMap
pub fn new() -> Self
pub fn add_context(&mut self)
pub fn remove_context(&mut self)
pub fn define_var(&mut self, name: String, idx: usize, t: Type)
pub fn is_var_defined(&mut self, name: &String) -> bool
pub fn is_var_defined_in_last_ctx(&mut self, name: &String) -> bool
pub fn get_var(&mut self, name: &String) -> Option<&(usize, Type)>
pub fn for_each_last_ctx<T: FnMut(usize)>(&self, f: T)
pub fn var_names(&self) -> FxHashSet<&String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VariableMap
impl RefUnwindSafe for VariableMap
impl Send for VariableMap
impl Sync for VariableMap
impl Unpin for VariableMap
impl UnwindSafe for VariableMap
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