Module path_like

Source
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 a PathBuf in structs and enums.
  • Accept impl PathLike instead of impl AsRef<Path> for methods which directly work with Path-like values.
  • Accept Into<PathLikeRef<'_>> and/or Into<PathLikeOwned> in methods which will store a Path-like value.

Modulesยง

path_like_impls ๐Ÿ”’
Implementations of PathLike within an std context.
path_like_owned_std_impls ๐Ÿ”’
Traits which can only be implemented for PathLikeOwned with std.
path_like_ref_std_impls ๐Ÿ”’
Traits which can only be implemented for PathLikeRef with std.
sealed ๐Ÿ”’

Structsยง

PathLikeOwned
Abstraction over PathBuf which falls back to String for no_std compatibility.
PathLikeRef
Abstraction over Path which falls back to str for no_std compatibility.

Traitsยง

PathLike
A trait that abstracts over types accepted for conversion to the most featureful path representation possible; that is: