Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Path/PathBuf #30

Open
Alxandr opened this issue Apr 26, 2020 · 3 comments
Open

Support for Path/PathBuf #30

Alxandr opened this issue Apr 26, 2020 · 3 comments

Comments

@Alxandr
Copy link

Alxandr commented Apr 26, 2020

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?

@maciejhirsz
Copy link
Owner

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.

@Alxandr
Copy link
Author

Alxandr commented May 2, 2020

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?

@maciejhirsz
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants