#[non_exhaustive]pub enum SyncError {
Empty,
TimedOut,
MergeReturnedNothing,
Io(Errno),
}Expand description
Errors from fence operations.
The variants carry the same discriminants the C++ std::error_code paths
document, 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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SyncError
impl RefUnwindSafe for SyncError
impl Send for SyncError
impl Sync for SyncError
impl Unpin for SyncError
impl UnsafeUnpin for SyncError
impl UnwindSafe for SyncError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more