Struct irust_repl::Repl
source · pub struct Repl {
pub cargo: Cargo,
/* private fields */
}
Fields§
§cargo: Cargo
Implementations§
source§impl Repl
impl Repl
pub fn new( toolchain: ToolChain, executor: Executor, main_result: MainResult, edition: Edition, prelude_parent_path: Option<PathBuf> ) -> Result<Self, Box<dyn Error>>
pub fn set_executor(&mut self, executor: Executor) -> Result<(), Box<dyn Error>>
pub fn update_from_extern_main_file(&mut self) -> Result<(), Box<dyn Error>>
pub fn hard_load(&mut self, code: impl ToString, cursor: usize)
pub fn insert(&mut self, input: impl ToString)
pub fn reset(&mut self) -> Result<(), Box<dyn Error>>
pub fn show(&self) -> String
pub fn eval( &mut self, input: impl ToString ) -> Result<EvalResult, Box<dyn Error>>
pub fn eval_with_configuration( &mut self, eval_config: EvalConfig<'_, impl ToString> ) -> Result<EvalResult, Box<dyn Error>>
pub fn eval_build( &mut self, input: impl ToString ) -> Result<EvalResult, Box<dyn Error>>
pub fn eval_check( &mut self, buffer: String ) -> Result<EvalResult, Box<dyn Error>>
pub fn eval_in_tmp_repl_without_io<T>( &mut self, input: String, f: impl FnMut(&Self) -> Result<T, Box<dyn Error>> ) -> Result<T, Box<dyn Error>>
pub fn eval_in_tmp_repl<T>( &mut self, input: String, f: impl FnMut(&Self) -> Result<T, Box<dyn Error>> ) -> Result<T, Box<dyn Error>>
pub fn toolchain(&self) -> ToolChain
pub fn set_toolchain(&mut self, toolchain: ToolChain)
pub fn set_main_result(&mut self, main_result: MainResult)
pub fn add_dep(&self, dep: &[String]) -> Result<Child>
pub fn build(&self) -> Result<Child>
pub fn write(&self) -> Result<()>
pub fn body(&self) -> String
pub fn write_to_extern(&self) -> Result<()>
pub fn with_lib<T>(&self, f: impl Fn() -> T) -> Result<T>
pub fn pop(&mut self)
pub fn del(&mut self, line_num: &str) -> Result<(), Box<dyn Error>>
pub fn lines(&self) -> impl Iterator<Item = &String>
pub fn lines_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Repl
impl Send for Repl
impl Sync for Repl
impl Unpin for Repl
impl UnwindSafe for Repl
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