pub fn new_in<T, U, V>(binary_name: T, paths: Option<U>, cwd: V) -> Result<CanonicalPath>
    where
        T: AsRef<OsStr>,
        U: AsRef<OsStr>,
        V: AsRef<path::Path>,
    {
        which_in(binary_name, paths, cwd)
            .and_then(|p| {
                p.canonicalize()
                    .map_err(|_| ErrorKind::CannotCanonicalize.into())
            })
            .map(|inner| CanonicalPath { inner })
    }
/// Returns the canonical path of an executable binary by name in the path list `paths` and
/// using the current working directory `cwd` to resolve relative paths.
///
/// This calls `which` and `Path::canonicalize` and maps the result into a `CanonicalPath`.
Returns the canonical path of an executable binary by name in the path list `paths` and
using the current working directory `cwd` to resolve relative paths.


Returns the canonical path of an executable binary by name in the path list ` paths ` and using the current working directory ` cwd ` to resolve relative paths .
pub fn new_in<T, U, V>(binary_name: T, paths: Option<U>, cwd: V) -> Result<CanonicalPath>
    where
        T: AsRef<OsStr>,
        U: AsRef<OsStr>,
        V: AsRef<path::Path>,
    {
        which_in(binary_name, paths, cwd)
            .and_then(|p| {
                p.canonicalize()
                    .map_err(|_| ErrorKind::CannotCanonicalize.into())
            })
            .map(|inner| CanonicalPath { inner })
    }
pub fn new_in < T , U , V > ( binary_name : T , paths : Option < U > , cwd : V ) -> Result < CanonicalPath > where T : AsRef < OsStr > , U : AsRef < OsStr > , V : AsRef < path :: Path > , { which_in ( binary_name , paths , cwd ) . and_then ( | p | { p . canonicalize ( ) . map_err ( | _ | ErrorKind :: CannotCanonicalize . into ( ) ) } ) . map ( | inner | CanonicalPath { inner } ) }
Returns the canonical path of an executable binary by name in the path list `paths` and
using the current working directory `cwd` to resolve relative paths.
Returns the canonical path of an executable binary by name in the path list ` paths ` and using the current working directory ` cwd ` to resolve relative paths .
binary_name
T
paths
Option<U>
cwd
V
binary_name
T
paths
Option<U>
cwd
V