#[non_exhaustive]pub enum SyncError {
Empty,
TimedOut,
MergeReturnedNothing,
Io(Errno),
}Expand description
Errors from fence operations.
The variants mirror the C++ failure cases one for one, and converting to
io::Error gives the errno the C++ std::error_code carries for each –
EBADF, ETIMEDOUT, EBADF, or the syscall’s own – so a consumer
bridging both implementations sees the same classification. In particular
EAGAIN-style flow control never hides inside a generic I/O error.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
The fence holds no descriptor.
The C++ reports errc::bad_file_descriptor for this, and for a
negative fd handed to import_fd. The latter case cannot arise here:
SyncFence::import takes a BorrowedFd, so an invalid descriptor
is a type error rather than a runtime one.
TimedOut
The wait expired before the fence signaled. errc::timed_out.
MergeReturnedNothing
The merge ioctl succeeded but returned no descriptor.
errc::bad_file_descriptor, as in the C++.
Io(Errno)
An underlying syscall failed.
Trait Implementations§
Source§impl Error for SyncError
impl Error for SyncError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()