pub struct RobinPath { /* private fields */ }Implementations§
Source§impl RobinPath
impl RobinPath
pub fn new() -> Self
pub fn with_environment(env: Environment) -> Self
Sourcepub fn execute(&mut self, source: &str) -> Result<Value, RobinPathError>
pub fn execute(&mut self, source: &str) -> Result<Value, RobinPathError>
Execute source code and return the final value
Sourcepub fn execute_ast(&mut self, stmts: &[Stmt]) -> Result<Value, RobinPathError>
pub fn execute_ast(&mut self, stmts: &[Stmt]) -> Result<Value, RobinPathError>
Execute pre-parsed AST
Sourcepub fn clear_output(&mut self)
pub fn clear_output(&mut self)
Clear captured output
Sourcepub fn get_variable(&self, name: &str) -> Option<&Value>
pub fn get_variable(&self, name: &str) -> Option<&Value>
Get a variable value
Sourcepub fn set_variable(&mut self, name: &str, value: Value)
pub fn set_variable(&mut self, name: &str, value: Value)
Set a variable
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RobinPath
impl !RefUnwindSafe for RobinPath
impl Send for RobinPath
impl Sync for RobinPath
impl Unpin for RobinPath
impl UnsafeUnpin for RobinPath
impl !UnwindSafe for RobinPath
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