pub trait AsPath {
    type Buffer: AsRef<CStr>;
    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

Associated Types

The return value of the to_path that holds data copied from the original path (if copy is needed, otherwise it’s just a reference)

Required methods

Returns None when path contains a zero byte

Implementations on Foreign Types

Implementors