Struct arret_compiler::repl::ReplCtx [−][src]
pub struct ReplCtx { /* fields omitted */ }
Implementations
impl ReplCtx
[src]
impl ReplCtx
[src]pub fn new(ccx: Arc<CompileCtx>) -> Self
[src]
Creates a new ReplCtx
This will launch a REPL engine thread which can asynchronously evaluate lines.
pub fn send_line(
&self,
input: String,
kind: EvalKind
) -> Result<(), EngineDisconnected>
[src]
&self,
input: String,
kind: EvalKind
) -> Result<(), EngineDisconnected>
Sends a line to be evaluated by the REPL engine
This is asynchronous and an unlimited number of lines can be sent before reading their results. This allows the calling thread to remain responsive to user input while evaluation, garbage collection, etc occurs.
pub fn receive_result(&self) -> Result<EvaledLine, Vec<Diagnostic<FileId>>>
[src]
Receives the next result from the REPL engine
These will be returned in the order they were submitted with send_line
.