]> git.proxmox.com Git - proxmox-backup.git/blobdiff - qemu-io/src/aio_context.rs
add qemu-io crate, AioContext reactor helper
[proxmox-backup.git] / qemu-io / src / aio_context.rs
diff --git a/qemu-io/src/aio_context.rs b/qemu-io/src/aio_context.rs
new file mode 100644 (file)
index 0000000..b2b1c10
--- /dev/null
@@ -0,0 +1,11 @@
+//! Provides a handle to an AioContext.
+
+#[cfg(feature="standalone")]
+mod standalone;
+#[cfg(feature="standalone")]
+pub use standalone::AioContext;
+
+// TODO: Add the non-standalone variant to be linked with Qemu:
+//    The AioContext struct should provide a high-level version of `set_fd_handler` with the same
+//    interface the standalone version provides out of the box (transparently turning closures into
+//    `extern "C" fn(opaque: *const c_void)` calls.