Struct badder_lang::controller::Controller [−][src]
Implementations
impl Controller
[src]
pub fn new(pause: Duration) -> Controller
[src]
pub fn new_no_pause() -> Controller
[src]
pub fn new_max_pause() -> Controller
[src]
pub fn set_pause_duration(&mut self, pause_time: Duration)
[src]
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
[src]
pub fn unpause(&mut self)
[src]
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
pub fn cancel(&mut self)
[src]
Requests any current executing interpreter be cancelled
pub fn current_phase(&self) -> Option<Phase>
[src]
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
[src]
pub fn result(&self) -> Option<&Result<Int, BadderError>>
[src]
Returns result of execution
pub fn paused(&self) -> bool
[src]
Returns current execution is paused, requires a recent (in terms of set pause_time) call to #refresh() to be valid
pub fn refresh(&mut self) -> bool
[src]
Communicate with the current execution populates #result & #current_phase if available Returns if a change has taken place
pub fn add_external_function(&mut self, id: &str)
[src]
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
pub fn clear_external_functions(&mut self)
[src]
pub fn current_external_call(&self) -> Option<ExternalCall>
[src]
pub fn answer_external_call(&mut self, result: Result<(Int, IntFlag), String>)
[src]
pub fn execute(&mut self, code: Ast)
[src]
Start executing code with a new thread. Effectively resets this instances state.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Controller
[src]
impl Send for Controller
[src]
impl !Sync for Controller
[src]
impl Unpin for Controller
[src]
impl !UnwindSafe for Controller
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,