azur 0.3.1

A no_std Rust crate that implements an executor/reactor and futures using io_uring
Documentation
mod accept;
mod delay;
mod nop;
mod openat;
mod poll;
mod read;
mod write;

pub use accept::*;
pub use delay::*;
pub use nop::*;
pub use openat::*;
pub use poll::*;
pub use read::*;
pub use write::*;

/// An io_uring operation.
///
/// # Safety
///
/// Care is needed to ensure that the implementation of `fill_sqe` is sound.
///
/// For example, it is unsound for an operation to take a reference to a buffer and pass it to
/// io_uring because the operation could be forgotten and the underlying buffer dropped. This
/// particular example is solved with the [`IoBuf`].
///
/// It is also unsound to write an invalid `user_data` to the entry.
pub unsafe trait Op {
    type Output;

    /// Creates a submission queue entry for this operation with the given `user_data`.
    fn fill_sqe(&mut self, sqe: &mut lx::io_uring_sqe);

    /// When the operation is completed, this method is called to turn the object into the operation
    /// output object. `ret` is the the operation's return value.
    fn complete(self, ret: i32) -> Self::Output;
}