pub trait PathJoined {
// Required method
fn iter_join(self) -> Result<PathBuf, Error>;
}Expand description
A trait for joining path components into a PathBuf.
This trait provides a method to join multiple path components into a single PathBuf.
It is implemented for tuples of varying lengths, allowing for flexible combinations of path components.
Each component must implement the TryIntoCowPath trait, enabling conversion into a Cow< Path >.
Required Methods§
Sourcefn iter_join(self) -> Result<PathBuf, Error>
fn iter_join(self) -> Result<PathBuf, Error>
Joins the path components into a single PathBuf.
§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 in the collection fails to convert
to Cow<Path> via the TryIntoCowPath trait. For standard types (&str, String,
PathBuf, &Path, Component), this conversion is infallible. Custom types
implementing TryIntoCowPath may return errors.