Trait pal::unix::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()).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SyscallResult for i32

source§

impl SyscallResult for isize

Implementors§