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())
.
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.