pal::unix

Trait SyscallResult

Source
pub trait SyscallResult: Sized {
    // Required method
    fn syscall_result(self) -> Result<Self, Errno>;
}
Expand description

A helper trait to convert from a libc return value to a Result<_, Errno>.

Required Methods§

Source

fn syscall_result(self) -> Result<Self, Errno>

Returns Ok(self) if self >= 0, otherwise Err(errno()).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl SyscallResult for i32

Source§

impl SyscallResult for isize

Implementors§