-
Notifications
You must be signed in to change notification settings - Fork 660
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
Expose strerror and strerror_r #545
Comments
You want a function |
So it looks like this behavior already exists in |
You can do this via a cast: |
I don't need this functionality anymore since discovering |
We can convert it to a doc issue :-) |
If you have a suggestion for how to document this, I can submit a PR for it. I just don't know where this should go. |
@Susurrus maybe module level docs on |
Re #545 (comment) would it be accepted to add Also, do you mean I should add docs to |
Regarding this, is there any reason to have hard-coded error strings in nix versus uses |
I'm refactoring some code of mine to use nix where possible but right now I can't get a string description for low-level errors. I used to use
errno
, but you can't do that easily withnix
because once you have anErrno
there's no way to get the underlyingi32
and pass that tolibc::strerror
. Instead of supporting extracting this integer, it'd be useful having a safe wrapper aroundstrerror
. I'd be happy to do this since I already have code that does it, but I don't know where it should go or if this functionality is desired innix
. Should I add wrappers forstrerror
andstrerror_r
in a new/src/string.rs
module?The text was updated successfully, but these errors were encountered: