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 thePathJoinedtrait.
§Returns
Ok(PathBuf)- The joined path as aPathBuf.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.