Struct arret_compiler::repl::ReplCtx[][src]

pub struct ReplCtx { /* fields omitted */ }

Implementations

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]

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.

Auto Trait Implementations

impl RefUnwindSafe for ReplCtx

impl Send for ReplCtx

impl Sync for ReplCtx

impl Unpin for ReplCtx

impl UnwindSafe for ReplCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.