pub trait AsPath {
type Buffer: AsRef<CStr>;
// Required method
fn to_path(self) -> Option<Self::Buffer>;
}
Expand description
The purpose of this is similar to AsRef<Path>
but it’s optimized for
things that can be directly used as CStr
(which is type passed to
the underlying system call).
This trait should be implemented for everything for which AsRef<Path>
is implemented