which

Function which 

Source
pub fn which(path: &str) -> Result<&'static str, Error>
Expand description

Resolve the provided path in the environment’s PATH variable. Note that this implementation will return a path as-is if it exists, which means that if binary exists in the current folder, it will be resolved to that. It will also just return absolute paths as-is, even if they aren’t executable.