Skip to main content

PathOrList

Trait PathOrList 

Source
pub trait PathOrList<T> {
    // Required method
    fn join_paths(&self, other: impl AsRef<[PathBuf]>) -> OsString;
}
Expand description

A trait that can represent both a reference to a Path like object or a list of paths. Used in Library::wrap_pkg_config and Library::from_internal_pkg_config to specify the list of pkg-config paths that should take priority.

Required Methods§

Source

fn join_paths(&self, other: impl AsRef<[PathBuf]>) -> OsString

Creates an string of paths appropiately joined for an environment variable. The paths in self will go before the paths in other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: AsRef<Path>, S: Borrow<[T]>> PathOrList<(T, S)> for &S

Source§

fn join_paths(&self, other: impl AsRef<[PathBuf]>) -> OsString

Source§

impl<T: PathOrList<S>, S> PathOrList<(T, S)> for Option<T>

Source§

fn join_paths(&self, other: impl AsRef<[PathBuf]>) -> OsString

Implementors§

Source§

impl<T: AsRef<Path>> PathOrList<T> for T