doc.rust-lang.org
pub macro eprint!
Prints to the standard error.
macro
std
Stable since 1.19.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn vars_os() -> VarsOs
Returns an iterator of (variable, value) pairs of OS strings, for all the environment variables of the current process.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn vars() -> Vars
Returns an iterator of (variable, value) pairs of strings, for all the environment variables of the current process.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn var_os<K>(key: K) -> Option<crate::ffi::OsString>
Fetches the environment variable key from the current process, returning None if the variable isn't set or if there is another error.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn var<K>(key: K) -> Result<String, VarError>
Fetches the environment variable key from the current process.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn temp_dir() -> crate::path::PathBuf
Returns the path of a temporary directory.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn split_paths<T>(unparsed: &T) -> SplitPaths<'_>
Parses input according to platform conventions for the PATH environment variable.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn set_var<K, V>(key: K, value: V)
Sets the environment variable key to the value value for the currently running process.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn set_current_dir<P>(path: P) -> io::Result<()>
Changes the current working directory to the specified path.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn remove_var<K>(key: K)
Removes an environment variable from the environment of the currently running process.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn join_paths<I, T>(paths: I) -> Result<crate::ffi::OsString, JoinPathsError>
Joins a collection of Paths appropriately for the PATH environment variable.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn home_dir() -> Option<crate::path::PathBuf>
Returns the path of the current user's home directory if known.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn current_exe() -> io::Result<crate::path::PathBuf>
Returns the full filesystem path of the current running executable.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn current_dir() -> io::Result<crate::path::PathBuf>
Returns the current working directory as a PathBuf.
function
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const OS: &str
A string describing the specific operating system in use. An example value may be: "linux", or "freebsd".
constant
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const FAMILY: &str
A string describing the family of the operating system. An example value may be: "unix", or "windows".
constant
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const EXE_SUFFIX: &str
Specifies the filename suffix, if any, used for executable binaries on this platform. An example value may be: ".exe", or ".efi".
constant
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const EXE_EXTENSION: &str
Specifies the file extension, if any, used for executable binaries on this platform. An example value may be: "exe", or an empty string ("").
constant
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const DLL_SUFFIX: &str
Specifies the filename suffix, if any, used for shared libraries on this platform. An example value may be: ".so", ".elf", or ".dll".
constant
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const DLL_PREFIX: &str
Specifies the filename prefix, if any, used for shared libraries on this platform. This is either "lib" or an empty string. ("").
constant
std
Stable since 1.0.0
Version 1.100.0-nightly