Which ErrorKind for ENOBUFS?

Hi, an absolute rust novice here... I'm trying to figure out how to translate this C code segment into rust:

        for (tries = 0; tries < MAXTRIES; tries++) {
                if (send(data->log_file, tbuf, cnt, 0) != -1)
                if (errno != ENOBUFS) {

I think I have found out that I need to match any error result from write!() against ErrorKind, but looking at

I am unable to find a matching ErrorKind for this Unix error code. Am I looking at the wrong enum, or is it simply missing at the moment?

And ... if anyone wonders where this comes from, it comes from

It's missing. You can use raw_os_error and compare to libc::ENOBUFS.

1 Like

Thanks for confirming my suspicion. I'll look into following the hints you provided.