pub struct VariableMap { /* private fields */ }Implementations§
Source§impl VariableMap
impl VariableMap
pub fn new() -> Self
pub fn depth(&self) -> usize
pub fn add_context(&mut self, is_base: bool)
pub fn remove_context(&mut self)
pub fn define_var(&mut self, name: String, idx: usize, t: Type) -> usize
pub fn count_up(&mut self) -> usize
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(&self, name: &String) -> Option<(usize, &(usize, Type))>
pub fn num_vars(&self) -> usize
pub fn for_each_last_ctx<T: FnMut(usize, &String, &Type)>(&self, f: T)
pub fn for_each_until_base<T: FnMut(usize, &String, &Type)>(&self, f: T)
pub fn var_names(&self) -> FxHashSet<&String>
Trait Implementations§
Source§impl Clone for VariableMap
impl Clone for VariableMap
Source§fn clone(&self) -> VariableMap
fn clone(&self) -> VariableMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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