//! cancelable syscall apis.
usecrate::handle::Handle;/// The returns type of [`WouldBlock`](std::io::ErrorKind::WouldBlock) operations.
pubenumCancelablePoll<T> {/// Operation is ready, returns operation result.
Ready(T),/// Operation is pending, returns operation cancel handle.
////// When pending handle drops, the syscall implementation should cancel
/// the pending operation referenced by this handle.
Pending(Handle),}/// Create a ready status of [`CancelablePoll`] from `F: FnOnce() -> T`.
pubfnready<T, F>(f: F)->CancelablePoll<T>where
F: FnOnce() -> T,
{CancelablePoll::Ready(f())}