Skip to main content

join

Function join 

Source
pub fn join<Paths: PathJoined>(paths: Paths) -> Result<PathBuf, Error>
Expand description

Joins path components into a PathBuf.

This function leverages the PathJoined trait to join multiple path components into a single PathBuf.

§Arguments

  • paths - A tuple of path components implementing the PathJoined trait.

§Returns

  • Ok(PathBuf) - The joined path as a PathBuf.
  • Err(io ::Error) - An error if any component fails to convert.

§Errors

Returns Err(io::Error) if any path component fails to convert to Cow<Path> via the TryIntoCowPath trait. In the current implementation, this never occurs for standard types (&str, String, PathBuf, &Path), but may fail for custom types or future extensions.