pub struct SleighCompiler { /* private fields */ }
Expand description
The primary interface for interacting with the Sleigh compiler
Implementations§
Source§impl SleighCompiler
impl SleighCompiler
Sourcepub fn new(options: SleighCompilerOptions) -> Self
pub fn new(options: SleighCompilerOptions) -> Self
Construct a new compiler instance configured with the given options. Use SleighCompiler::default to create an instance with default options.
Sourcepub fn compile(
&mut self,
input_slaspec_path: impl AsRef<Path>,
output_sla_path: impl AsRef<Path>,
) -> Result<SleighCompilerResponse>
pub fn compile( &mut self, input_slaspec_path: impl AsRef<Path>, output_sla_path: impl AsRef<Path>, ) -> Result<SleighCompilerResponse>
Invoke the compiler on the provided .slaspec
input file. The output .sla
file will be
written to the given output path. On success will return the compiler response with a 0
exit code. All warnings are reproduced in the warnings
field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SleighCompiler
impl RefUnwindSafe for SleighCompiler
impl !Send for SleighCompiler
impl !Sync for SleighCompiler
impl Unpin for SleighCompiler
impl UnwindSafe for SleighCompiler
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