Struct nu_engine::evaluation_context::EvaluationContext [−][src]
pub struct EvaluationContext { pub scope: Scope, pub engine_state: Arc<EngineState>, }
Fields
scope: Scope
engine_state: Arc<EngineState>
Implementations
pub fn new(
scope: Scope,
host: Arc<Mutex<Box<dyn Host>>>,
current_errors: Arc<Mutex<Vec<ShellError>>>,
ctrl_c: Arc<AtomicBool>,
configs: Arc<Mutex<ConfigHolder>>,
shell_manager: ShellManager,
windows_drives_previous_cwd: Arc<Mutex<HashMap<String, String>>>
) -> Self
pub fn run_command(
&self,
command: Command,
name_tag: Tag,
args: Call,
input: InputStream
) -> Result<InputStream, ShellError>
Loads config under cfg_path. If an error occurs while loading the config: The config is not loaded The error is returned After successful loading of the config the startup scripts are run as normal scripts (Errors are printed out, …) After executing the startup scripts, true is returned to indicate successful loading of the config
Reloads config with a path of cfg_path. If an error occurs while reloading the config: The config is not reloaded The error is returned
Runs all exit_scripts before unloading the config with path of cfg_path
If an error occurs while running exit scripts:
The error is added to self.current_errors
If no config with path of cfg_path
is present, this method does nothing
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for EvaluationContext
impl Send for EvaluationContext
impl Sync for EvaluationContext
impl Unpin for EvaluationContext
impl !UnwindSafe for EvaluationContext
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self