pub struct BindingContext { /* private fields */ }Expand description
Context containing all bound variables and their information.
Implementations§
Source§impl BindingContext
impl BindingContext
Sourcepub fn add_variable(&mut self, name: String, info: VariableInfo)
pub fn add_variable(&mut self, name: String, info: VariableInfo)
Adds a variable to the context.
Sourcepub fn get(&self, name: &str) -> Option<&VariableInfo>
pub fn get(&self, name: &str) -> Option<&VariableInfo>
Looks up a variable by name.
Sourcepub fn variable_names(&self) -> &[String]
pub fn variable_names(&self) -> &[String]
Returns all variable names in definition order.
Trait Implementations§
Source§impl Clone for BindingContext
impl Clone for BindingContext
Source§fn clone(&self) -> BindingContext
fn clone(&self) -> BindingContext
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 moreSource§impl Debug for BindingContext
impl Debug for BindingContext
Source§impl Default for BindingContext
impl Default for BindingContext
Source§fn default() -> BindingContext
fn default() -> BindingContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BindingContext
impl RefUnwindSafe for BindingContext
impl Send for BindingContext
impl Sync for BindingContext
impl Unpin for BindingContext
impl UnwindSafe for BindingContext
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