Crate yash_env

Source
Expand description

This crate defines the shell execution environment.

A shell execution environment, Env, is a collection of data that may affect or be affected by the execution of commands. The environment consists of application-managed parts and system-managed parts. Application-managed parts are implemented in pure Rust in this crate. Many application-managed parts like functions and variables can be manipulated independently of interactions with the underlying system. System-managed parts, on the other hand, depend on the underlying system. Attributes like the working directory and umask are managed by the system to be accessed only by interaction with the system interface.

The System trait is the interface to the system-managed parts. RealSystem provides an implementation for System that interacts with the underlying system. VirtualSystem is a dummy for simulating the system’s behavior without affecting the actual system.

Re-exports§

pub use self::system::SharedSystem;
pub use self::system::System;
pub use self::system::real::RealSystem;
pub use self::system::virtual::VirtualSystem;
pub use unix_path as path;
pub use unix_str as str;

Modules§

any
Types for storing arbitrary data in the environment
builtin
Type definitions for built-in utilities
function
Type definitions for functions.
input
Methods about passing source code to the parser.
io
Type definitions for I/O.
job
Type definitions for job management.
option
Type definitions for shell options
pwd
Working directory path handling
semantics
Type definitions for command execution.
signal
Type definitions for signals
stack
Runtime execution context stack
subshell
Utility for starting subshells
system
System and its implementors.
trap
Signal and other event handling settings.
variable
Items for shell variables

Structs§

Env
Whole shell execution environment.