pub struct CompileEnvironment {
use_line: bool,
line: u32,
specials: Option<Specials>,
global_map: HashMap<Interned, usize>,
gensym_idx: usize,
namespace: Namespace,
noop_map: HashMap<String, Value>,
}Fields§
§use_line: bool§line: u32§specials: Option<Specials>§global_map: HashMap<Interned, usize>§gensym_idx: usize§namespace: Namespace§noop_map: HashMap<String, Value>Some functions can be swapped to/from a noop at runtime for various reasons,
e.g. make sure nothing can write to stdout; this field tracks the Value
the function should point to so the user can swap that back in when they
no longer want it to be a noop.
Implementations§
Source§impl CompileEnvironment
impl CompileEnvironment
pub fn new() -> Self
pub fn next_gensym(&mut self) -> usize
pub fn line(&self) -> u32
pub fn set_namespace(&mut self, namespace: Namespace)
pub fn add_ns_import(&mut self, ns: String, alias: Option<String>)
pub fn get_namespace(&self) -> &Namespace
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompileEnvironment
impl RefUnwindSafe for CompileEnvironment
impl Send for CompileEnvironment
impl Sync for CompileEnvironment
impl Unpin for CompileEnvironment
impl UnwindSafe for CompileEnvironment
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