diskann_platform/linux/
ssd_io_context.rs

1/*
2 * Copyright (c) Microsoft Corporation.
3 * Licensed under the MIT license.
4 */
5
6use std::fs::File;
7
8use io_uring::IoUring;
9
10// The IOContext struct for disk I/O. One for each thread.
11pub struct IOContext {
12    pub file_handle: File,
13    pub ring: IoUring,
14}
15
16impl IOContext {
17    pub fn new(file_handle: File, ring: IoUring) -> Self {
18        IOContext { file_handle, ring }
19    }
20}