pub struct RustCompiler { /* private fields */ }Expand description
Rust compiler checker
Implementations§
Source§impl RustCompiler
impl RustCompiler
Sourcepub fn check_code(
&self,
code: &str,
) -> Result<CompilationResult, Box<dyn Error>>
pub fn check_code( &self, code: &str, ) -> Result<CompilationResult, Box<dyn Error>>
Check Rust code for compilation errors
This creates a temporary Rust project and runs cargo check to validate the code
Sourcepub fn check_code_with_deps(
&self,
code: &str,
dependencies: &[(&str, &str)],
) -> Result<CompilationResult, Box<dyn Error>>
pub fn check_code_with_deps( &self, code: &str, dependencies: &[(&str, &str)], ) -> Result<CompilationResult, Box<dyn Error>>
Check Rust code with custom dependencies
Sourcepub fn quick_check(
&self,
code: &str,
) -> Result<CompilationResult, Box<dyn Error>>
pub fn quick_check( &self, code: &str, ) -> Result<CompilationResult, Box<dyn Error>>
Quick syntax check without full compilation Uses rustc directly for faster feedback
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustCompiler
impl RefUnwindSafe for RustCompiler
impl Send for RustCompiler
impl Sync for RustCompiler
impl Unpin for RustCompiler
impl UnsafeUnpin for RustCompiler
impl UnwindSafe for RustCompiler
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