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§
sourcefn syscall_result(self) -> Result<Self, Errno>
fn syscall_result(self) -> Result<Self, Errno>
Returns Ok(self)
if self >= 0
, otherwise Err(errno())
.
Object Safety§
This trait is not object safe.