Expand description
PathLike
and its supporting items, such as PathLikeRef
and PathLikeOwned
.
This trait and these types provide a common denominator API for Path
-like
types and operations in std
and no_std
contexts.
ยงUsage
- Store a [
PathLikeRef<'a>
] instead of a&'a Path
in structs and enums. - Store a
PathLikeOwned
instead of aPathBuf
in structs and enums. - Accept
impl PathLike
instead ofimpl AsRef<Path>
for methods which directly work withPath
-like values. - Accept
Into<PathLikeRef<'_>>
and/orInto<PathLikeOwned>
in methods which will store aPath
-like value.
Modulesยง
- path_
like_ ๐impls - Implementations of
PathLike
within anstd
context. - path_
like_ ๐owned_ std_ impls - Traits which can only be implemented for
PathLikeOwned
withstd
. - path_
like_ ๐ref_ std_ impls - Traits which can only be implemented for
PathLikeRef
withstd
. - sealed ๐
Structsยง
- Path
Like Owned - Abstraction over
PathBuf
which falls back toString
forno_std
compatibility. - Path
Like Ref - Abstraction over
Path
which falls back tostr
forno_std
compatibility.
Traitsยง
- Path
Like - A trait that abstracts over types accepted for conversion to the most featureful path representation possible; that is: