pub struct Executor {
pub context: Context,
}Expand description
Executor that is responsible for executing the program’s commands.
It uses the given Context to store and retrieve values during runtime.
Fields§
§context: ContextThe default context for the executor
Implementations§
source§impl Executor
impl Executor
sourcepub fn former() -> ExecutorFormer<Executor, ReturnContainer>
pub fn former() -> ExecutorFormer<Executor, ReturnContainer>
Make former, variation of builder pattern to form structure defining values of fields step by step.
source§impl Executor
impl Executor
sourcepub fn program(
&self,
dictionary: &Dictionary,
program: Program<VerifiedCommand>
) -> Result<()>
pub fn program( &self, dictionary: &Dictionary, program: Program<VerifiedCommand> ) -> Result<()>
Executes a program
Setup runtimes for each namespace into program and run it with specified execution type
sourcepub fn command(
&self,
dictionary: &Dictionary,
command: VerifiedCommand
) -> Result<()>
pub fn command( &self, dictionary: &Dictionary, command: VerifiedCommand ) -> Result<()>
Executes a command
Call command callback with context if it is necessary.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl !Send for Executor
impl !Sync for Executor
impl Unpin for Executor
impl !UnwindSafe for Executor
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
source§impl<S> SetWithType for S
impl<S> SetWithType for S
source§fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
Function to set value of a component by its type.