pub struct Compiler<State = ()>{ /* private fields */ }Implementations§
Source§impl<State> Compiler<State>
impl<State> Compiler<State>
pub fn new(engine: Engine<State>) -> Self
pub fn compile_expr( &mut self, expr: &Expr, ) -> Result<CompiledProgram, CompileError>
pub fn compile_snippet( &mut self, source: &str, gas: &mut GasMeter, ) -> Result<CompiledProgram, CompileError>
pub fn compile_snippet_at( &mut self, source: &str, importer_path: impl AsRef<Path>, gas: &mut GasMeter, ) -> Result<CompiledProgram, CompileError>
pub fn compile_library_file( &mut self, path: impl AsRef<Path>, gas: &mut GasMeter, ) -> Result<CompiledProgram, CompileError>
pub async fn compile_repl_program( &mut self, program: &Program, state: &mut ReplState, gas: &mut GasMeter, ) -> Result<CompiledProgram, CompileError>
Trait Implementations§
Auto Trait Implementations§
impl<State> Freeze for Compiler<State>
impl<State = ()> !RefUnwindSafe for Compiler<State>
impl<State> Send for Compiler<State>
impl<State> Sync for Compiler<State>
impl<State> Unpin for Compiler<State>
impl<State> UnsafeUnpin for Compiler<State>
impl<State = ()> !UnwindSafe for Compiler<State>
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