Struct badder_lang::controller::Controller
source · pub struct Controller { /* private fields */ }
Implementations§
source§impl Controller
impl Controller
pub fn new(pause: Duration) -> Controller
pub fn new_no_pause() -> Controller
pub fn new_max_pause() -> Controller
sourcepub fn set_pause_duration(&mut self, pause_time: Duration)
pub fn set_pause_duration(&mut self, pause_time: Duration)
Modifies the pause time, the duration the interpreter will block for before non-trivial AST interpretation waiting for a #unpause() or #cancel() call after the duration execution will continue automatically
pub fn pause_duration(&self) -> Duration
sourcepub fn unpause(&mut self)
pub fn unpause(&mut self)
Unblocks current waiting phase’s execution, if it is blocked. Requires a recent (in terms of set pause_time) call to #refresh() to be valid
sourcepub fn current_phase(&self) -> Option<Phase>
pub fn current_phase(&self) -> Option<Phase>
Returns current execution phase, requires a recent (in terms of set pause_time) call to #refresh() to be valid
pub fn run_stats(&self) -> &RunStats
sourcepub fn paused(&self) -> bool
pub fn paused(&self) -> bool
Returns current execution is paused, requires a recent (in terms of set pause_time) call to #refresh() to be valid
sourcepub fn refresh(&mut self) -> bool
pub fn refresh(&mut self) -> bool
Communicate with the current execution populates #result & #current_phase if available Returns if a change has taken place
sourcepub fn add_external_function(&mut self, id: &str)
pub fn add_external_function(&mut self, id: &str)
Adds an external function signature
must be a valid badder signature to work
ie some_ext_function(svv)
for a 3 arg function taking a sequence & 2 variable arguments