pub struct Environment<Stdout, Stderr>{
pub val_cache: BTreeMap<String, Rc<Value>>,
pub op_cache: Ops,
pub converter_registry: ConverterRegistry,
pub importer_registry: ImporterRegistry,
pub assert_results: AssertCollector,
pub stdout: Stdout,
pub stderr: Stderr,
pub env_vars: BTreeMap<String, String>,
pub out_lock: BTreeSet<PathBuf>,
}
Fields§
§val_cache: BTreeMap<String, Rc<Value>>
§op_cache: Ops
§converter_registry: ConverterRegistry
§importer_registry: ImporterRegistry
§assert_results: AssertCollector
§stdout: Stdout
§stderr: Stderr
§env_vars: BTreeMap<String, String>
§out_lock: BTreeSet<PathBuf>
Implementations§
Source§impl<Stdout: Write + Clone, Stderr: Write + Clone> Environment<Stdout, Stderr>
impl<Stdout: Write + Clone, Stderr: Write + Clone> Environment<Stdout, Stderr>
pub fn new(out: Stdout, err: Stderr) -> Self
pub fn new_with_vars( out: Stdout, err: Stderr, vars: BTreeMap<String, String>, ) -> Self
pub fn get_env_vars_tuple(&self) -> Value
pub fn get_cached_path_val(&self, path: &String) -> Option<Rc<Value>>
pub fn update_path_val(&mut self, path: &String, val: Rc<Value>)
pub fn get_ops_for_path<P>(&mut self, path: P) -> Result<OpPointer, Error>
pub fn record_assert_result(&mut self, desc: &str, ok: bool)
pub fn get_out_lock_for_path<P: AsRef<Path>>(&self, path: P) -> bool
pub fn set_out_lock_for_path<P: Into<PathBuf>>(&mut self, path: P)
pub fn reset_out_lock_for_path<P: AsRef<Path>>(&mut self, path: P)
pub fn stdout(&self) -> Stdout
pub fn stderr(&self) -> Stderr
pub fn convert_val( &mut self, typ: &str, writer: &mut dyn Write, val: Rc<Val>, ) -> bool
Auto Trait Implementations§
impl<Stdout, Stderr> Freeze for Environment<Stdout, Stderr>
impl<Stdout, Stderr> !RefUnwindSafe for Environment<Stdout, Stderr>
impl<Stdout, Stderr> !Send for Environment<Stdout, Stderr>
impl<Stdout, Stderr> !Sync for Environment<Stdout, Stderr>
impl<Stdout, Stderr> Unpin for Environment<Stdout, Stderr>
impl<Stdout, Stderr> !UnwindSafe for Environment<Stdout, Stderr>
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