pub trait CheckLibcResult: Sized {
// Required method
fn check_libc_neg(self) -> Result<Self>;
}Expand description
Convert a libc-style return value into an io::Result.
Negative values are treated as errors; errno is read via errno_io_error.
Modeled after PyPy’s rposix.handle_posix_error.
Required Methods§
Sourcefn check_libc_neg(self) -> Result<Self>
fn check_libc_neg(self) -> Result<Self>
Returns Ok(self) if non-negative, otherwise Err with the current errno.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".