Struct move_ir_compiler::Compiler
source · [−]pub struct Compiler<'a> {
pub deps: Vec<&'a CompiledModule>,
}Expand description
An API for the compiler. Supports setting custom options.
Fields
deps: Vec<&'a CompiledModule>Extra dependencies to compile with.
Implementations
sourceimpl<'a> Compiler<'a>
impl<'a> Compiler<'a>
pub fn new(deps: Vec<&'a CompiledModule>) -> Self
sourcepub fn into_compiled_script_and_source_map(
self,
code: &str
) -> Result<(CompiledScript, SourceMap)>
pub fn into_compiled_script_and_source_map(
self,
code: &str
) -> Result<(CompiledScript, SourceMap)>
Compiles into a CompiledScript where the bytecode hasn’t been serialized.
sourcepub fn into_script_blob(self, code: &str) -> Result<Vec<u8>>
pub fn into_script_blob(self, code: &str) -> Result<Vec<u8>>
Compiles the script into a serialized form.
sourcepub fn into_compiled_module(self, code: &str) -> Result<CompiledModule>
pub fn into_compiled_module(self, code: &str) -> Result<CompiledModule>
Compiles the module.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Compiler<'a>
impl<'a> Send for Compiler<'a>
impl<'a> Sync for Compiler<'a>
impl<'a> Unpin for Compiler<'a>
impl<'a> UnwindSafe for Compiler<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more