Skip to main content

CheckLibcResult

Trait CheckLibcResult 

Source
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§

Source

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".

Implementations on Foreign Types§

Source§

impl CheckLibcResult for i16

Source§

fn check_libc_neg(self) -> Result<Self>

Source§

impl CheckLibcResult for i32

Source§

fn check_libc_neg(self) -> Result<Self>

Source§

impl CheckLibcResult for i64

Source§

fn check_libc_neg(self) -> Result<Self>

Source§

impl CheckLibcResult for isize

Source§

fn check_libc_neg(self) -> Result<Self>

Implementors§