Open vic1707 opened 2 months ago
Uh.
The short answer is no, there is no way to support fallible sanitizers, and I don't think it will be supported.
What is more realistically is to support validators that would return a new value in Ok()
.
But to be honest, I have never thought of the use case like this before.
Understandable π
Would you be open to proposals, I'd like to give it a try to see what it would require ? π
(I have no clue if it's even possible I'm just curious π)
Would you be open to proposals
I am not sure yet. The problem with that is that it will break the conceptual model that exists at the moment. It will also will require a lot of code changes and breaking the existing API.
Though, I don't wanna stop you from experimenting if you want to, I just don't feel committed to this at the moment.
Do you have any other potential sanitization functions that could fail?
Ok no problem π
I don't have any other fallible sanitization function in mind at the moment, if I find some I'll tell you
I have a new type wrapping a
std:::fs::PathBuf
, I'd like for it to always be an absolute path.std::fs::canonicalize
does exactly that but is fallible (io::Result<Pathbuf>
). Is it feasible to add support for fallible sanitizers? Currently I can work around that limitation by unwraping it but I'm not a fan π.