Skip to main content

PathEnv

Trait PathEnv 

Source
pub trait PathEnv {
    // Required methods
    fn path(&self) -> Expansion<'_>;
    fn is_executable_file(&self, path: &CStr) -> bool;
}
Expand description

Part of the shell execution environment command path search depends on

Required Methods§

Source

fn path(&self) -> Expansion<'_>

Accesses the $PATH variable in the environment.

This function returns an Expansion rather than a reference to a variable value because the path may be dynamically computed in the function.

Source

fn is_executable_file(&self, path: &CStr) -> bool

Whether there is an executable file at the specified path.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§