Kernel error numbers are non-zero and positive, so I was wondering if it would make sense to constrain the Error type in that way (making the from c_int conversion fallible).
It could use the NonZero wrapper for now, and in the future might be able to have a niche for negative numbers as well. This would allow a return type of KernelResult<()> to be exactly equivalent to c_int.
Kernel error numbers are non-zero and positive, so I was wondering if it would make sense to constrain the
Errortype in that way (making the from c_int conversion fallible).It could use the
NonZerowrapper for now, and in the future might be able to have a niche for negative numbers as well. This would allow a return type ofKernelResult<()>to be exactly equivalent toc_int.