Open Alxandr opened 4 years ago
Sadly neither PathBuf
or OsString
exposes *_raw_parts
methods, or any way to get a byte pointer or some such, so this has to sit on the backburner until std is extended.
Yeah. I looked at implementing it myself the other day and ran into the same issue. Was hoping that more eyes on the issue might figure out something clever :P. Maybe if there exists some other type than PathBuf
that is AsRef<Path>
that does allow getting parts?
The only such type that can correctly map it is OsStr
/OsSTring
. The os_str_bytes
crate might be of some use here, will have to dig in further.
As far as I can see, I'm not able to put own/std types into a beefcow except those that are explicitly enabled in this library. So would it be possible to add support for
Path
/PathBuf
?