It is sometimes more useful to have a string of the errno name ("INVAL") than the docs ("Invalid argument." This PR updates witx-bindgen to create functions for errno_name(u16) -> &'static str and renames strerror to errno_docs(u16) -> &'static str. The name is used in Error's Display impl, and both are provided in the Debug impl.
It is sometimes more useful to have a string of the errno name (
"INVAL"
) than the docs ("Invalid argument."
This PR updateswitx-bindgen
to create functions forerrno_name(u16) -> &'static str
and renamesstrerror
toerrno_docs(u16) -> &'static str
. The name is used inError
'sDisplay
impl, and both are provided in theDebug
impl.