[][src]Struct evcxr::EvalContext

pub struct EvalContext {
    pub preserve_vars_on_panic: bool,
    // some fields omitted
}

Fields

preserve_vars_on_panic: bool

Implementations

impl EvalContext[src]

pub fn new() -> Result<(EvalContext, EvalContextOutputs), Error>[src]

pub fn with_subprocess_command(
    subprocess_command: Command
) -> Result<(EvalContext, EvalContextOutputs), Error>
[src]

pub fn eval(&mut self, code: &str) -> Result<EvalOutputs, Error>[src]

Evaluates the supplied Rust code.

pub fn time_passes(&self) -> bool[src]

pub fn set_time_passes(&mut self, value: bool)[src]

pub fn opt_level(&self) -> &str[src]

pub fn set_opt_level(&mut self, level: &str) -> Result<(), Error>[src]

pub fn output_format(&self) -> &str[src]

pub fn set_output_format(&mut self, output_format: String)[src]

pub fn set_sccache(&mut self, enabled: bool) -> Result<(), Error>[src]

pub fn sccache(&self) -> bool[src]

pub fn set_error_format(&mut self, format_str: &str) -> Result<(), Error>[src]

pub fn error_format(&self) -> &str[src]

pub fn error_format_trait(&self) -> &str[src]

pub fn set_linker(&mut self, linker: String)[src]

pub fn linker(&self) -> &str[src]

pub fn add_extern_crate(
    &mut self,
    name: String,
    config: String
) -> Result<EvalOutputs, Error>
[src]

pub fn add_dep(&mut self, name: &str, config: &str) -> Result<(), Error>[src]

Adds a crate dependency with the specified name and configuration. Actual compilation is deferred until the next call to eval. If that call fails, then this dependency will be reverted. If you want to compile straight away and ensure that the change is committed, then follow this call with a call to eval("");

pub fn debug_mode(&self) -> bool[src]

pub fn set_debug_mode(&mut self, debug_mode: bool)[src]

pub fn variables_and_types(&self) -> impl Iterator<Item = (&str, &str)>[src]

pub fn defined_item_names(&self) -> impl Iterator<Item = &str>[src]

pub fn clear(&mut self) -> Result<(), Error>[src]

Auto Trait Implementations

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,