1
0
Fork 0
forked from wry/wry

io_uring: move runtime into workspace crate

This commit is contained in:
kossLAN 2026-05-29 09:22:59 -04:00
parent 03d3876888
commit c3b17db151
No known key found for this signature in database
22 changed files with 662 additions and 617 deletions

30
io-uring/src/ops.rs Normal file
View file

@ -0,0 +1,30 @@
use {crate::IoUringError, jay_utils::oserror::OsError};
pub mod accept;
pub mod async_cancel;
pub mod connect;
pub mod poll;
pub mod poll_external;
pub mod read_write;
pub mod read_write_no_cancel;
pub mod recvmsg;
pub mod sendmsg;
pub mod timeout;
pub mod timeout_external;
pub mod timeout_link;
pub type TaskResult<T> = Result<Result<T, OsError>, IoUringError>;
pub trait TaskResultExt<T> {
fn merge(self) -> Result<T, IoUringError>;
}
impl<T> TaskResultExt<T> for TaskResult<T> {
fn merge(self) -> Result<T, IoUringError> {
match self {
Ok(Ok(t)) => Ok(t),
Ok(Err(e)) => Err(IoUringError::OsError(e)),
Err(e) => Err(e),
}
}
}