pub struct Evaluator { /* private fields */ }
Expand description
Effects Shell evaluator - handles I/O and mutable state
Implementations§
Source§impl Evaluator
impl Evaluator
Sourcepub fn add_tla_code(&mut self, key: &str, value: &str)
pub fn add_tla_code(&mut self, key: &str, value: &str)
Add a top-level argument (effects: modifies internal state)
Sourcepub fn add_tla_args(&mut self, args: HashMap<String, String>)
pub fn add_tla_args(&mut self, args: HashMap<String, String>)
Add multiple TLA arguments at once
Sourcepub fn load_ext_vars_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
pub fn load_ext_vars_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
Load external variables from a file (effects: file I/O)
Sourcepub fn evaluate(&mut self, source: &str) -> Result<JsonnetValue>
pub fn evaluate(&mut self, source: &str) -> Result<JsonnetValue>
Evaluate a Jsonnet expression (effects: may involve external libraries)
Sourcepub fn evaluate_file(
&mut self,
source: &str,
_filename: &str,
) -> Result<JsonnetValue>
pub fn evaluate_file( &mut self, source: &str, _filename: &str, ) -> Result<JsonnetValue>
Evaluate a Jsonnet file (effects: filename handling)
Sourcepub fn evaluate_file_from_path<P: AsRef<Path>>(
&mut self,
path: P,
) -> Result<JsonnetValue>
pub fn evaluate_file_from_path<P: AsRef<Path>>( &mut self, path: P, ) -> Result<JsonnetValue>
Evaluate a file from disk (effects: file I/O)
Sourcepub fn get_tla_args(&self) -> &HashMap<String, String>
pub fn get_tla_args(&self) -> &HashMap<String, String>
Get current TLA arguments (for debugging)
Sourcepub fn get_ext_vars(&self) -> &HashMap<String, String>
pub fn get_ext_vars(&self) -> &HashMap<String, String>
Get current external variables (for debugging)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Evaluator
impl RefUnwindSafe for Evaluator
impl Send for Evaluator
impl Sync for Evaluator
impl Unpin for Evaluator
impl UnwindSafe for Evaluator
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