pub struct CompileBuilder { /* private fields */ }Expand description
Programmatically build a rustc compilation session
Implementations§
Source§impl CompileBuilder
impl CompileBuilder
Sourcepub fn new(input: impl Into<String>) -> Self
pub fn new(input: impl Into<String>) -> Self
Initialize a compilation from this string of source code.
Sourcepub fn with_args(&mut self, args: impl IntoIterator<Item = String>) -> &mut Self
pub fn with_args(&mut self, args: impl IntoIterator<Item = String>) -> &mut Self
Append additional rustc arguments
Sourcepub fn compile(&self, f: impl for<'tcx> FnOnce(CompileResult<'tcx>) + Send)
pub fn compile(&self, f: impl for<'tcx> FnOnce(CompileResult<'tcx>) + Send)
Perform the compilation, providing access to it’s intermediates state to the provided closure
Auto Trait Implementations§
impl Freeze for CompileBuilder
impl RefUnwindSafe for CompileBuilder
impl Send for CompileBuilder
impl Sync for CompileBuilder
impl Unpin for CompileBuilder
impl UnsafeUnpin for CompileBuilder
impl UnwindSafe for CompileBuilder
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