pub struct Evaluator<'a> { /* private fields */ }Implementations§
Source§impl<'a> Evaluator<'a>
impl<'a> Evaluator<'a>
pub fn new(env: &'a mut Environment, program: &'a Program) -> Self
pub fn exec(&mut self) -> RexxResult<ExecSignal>
Sourcepub fn set_main_args(&mut self, args: Vec<RexxValue>)
pub fn set_main_args(&mut self, args: Vec<RexxValue>)
Public setter so main.rs can push CLI arguments for the main program.
Sourcepub fn set_command_handler(
&mut self,
handler: Box<dyn FnMut(&str, &str) -> Option<i32>>,
)
pub fn set_command_handler( &mut self, handler: Box<dyn FnMut(&str, &str) -> Option<i32>>, )
Set a custom command handler for ADDRESS environments.
The handler receives (address_environment, command_string) and returns:
Some(rc)if it handled the command (rc is the return code)Noneif the command should fall through to default shell execution
This allows embedding applications (like XEDIT) to intercept commands sent to custom ADDRESS environments.
Auto Trait Implementations§
impl<'a> Freeze for Evaluator<'a>
impl<'a> !RefUnwindSafe for Evaluator<'a>
impl<'a> !Send for Evaluator<'a>
impl<'a> !Sync for Evaluator<'a>
impl<'a> Unpin for Evaluator<'a>
impl<'a> !UnwindSafe for Evaluator<'a>
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