Open chrysn opened 1 month ago
Converted to a draft while waiting for https://github.com/RIOT-OS/rust-riot-sys/pull/49 -- then, we can add core::error::Error (with a fallback to numeric representation) here too.
Now also implements Display and Error (although the Display implementation is only good if the module tiny_strerror is available)
A goal with the NegativeError type is to tell the compiler that all positive values are niches. While that's impossible or at least hard and compile time heavy, advertising the niche at 0 to the compiler is easy enough.
Along with this comes a documentation extension and minor internal refactorings.