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

[Feature request] Support for serializing Path/PathBuf #598

Closed
begleynk opened this issue Mar 7, 2024 · 2 comments
Closed

[Feature request] Support for serializing Path/PathBuf #598

begleynk opened this issue Mar 7, 2024 · 2 comments
Milestone

Comments

@begleynk
Copy link

begleynk commented Mar 7, 2024

Would it be possible to implement Encoder/Decoder for Rust's Path/Pathbuf types?

I'm currently working on a project where I own all the types in a complex struct, but because the standard library's Path/PathBuf can't be serialized over to Elixir, it's forcing me to create wrapper types. This would be a huge ergonomic benefit.

Happy to contribute a PR if this is straightforward.

Thanks for all your work on Rustler ❤️

@filmor
Copy link
Member

filmor commented Mar 9, 2024

If all you are looking for is Path(Buf) <-> binary string, I don't see a problem with that.

@begleynk
Copy link
Author

Yup that's fine by me 👍 The Elixir Path module just works on binary strings, so this seems reasonable.

I'll try to contribute a PR for this in the coming days/weeks.

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