pub struct AST { /* private fields */ }Expand description
Compiled Script
Implementations§
Source§impl AST
impl AST
Sourcepub fn executor(&self) -> ASTExecutor<'_>
pub fn executor(&self) -> ASTExecutor<'_>
Gets an executor for this script, from this executor you can both give input variables and execute it afterward.
Sourcepub fn to_optimized_ast(self) -> OptimizedAST
pub fn to_optimized_ast(self) -> OptimizedAST
Turns this AST into an OptimizedAST, using OptimizedAST is always preferred over AST.
Sourcepub fn execute(&self) -> Result<MoonValue, RuntimeError>
pub fn execute(&self) -> Result<MoonValue, RuntimeError>
Executes the script withouth any input variables, if you want to specify them, get its Self::executor and push variables to it with ASTExecutor::push_variable before calling ASTExecutor::execute.
Trait Implementations§
Source§impl From<AST> for OptimizedAST
impl From<AST> for OptimizedAST
impl StructuralPartialEq for AST
Auto Trait Implementations§
impl Freeze for AST
impl !RefUnwindSafe for AST
impl Send for AST
impl Sync for AST
impl Unpin for AST
impl !UnwindSafe for AST
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)