Skip to main content

split_paths_ref

Function split_paths_ref 

Source
pub fn split_paths_ref<T: AsRef<OsStr> + ?Sized>(
    unparsed: &T,
) -> Option<SplitPathsRef<'_>>
🔬This is a nightly-only experimental API. (env_split_paths_ref)
Expand description

Parses input according to platform conventions for the PATH environment variable.

Unlike split_paths, this function does not allocate and instead yields Paths borrowed from unparsed. Returns None on platforms that may require allocations to handle PATH splitting conventions.

§Platform-specific behavior

Returns Some on Unix platforms and None on all other platforms. Note that this may change in the future.