| 83 | pub type AsyncIoResult<T> = std::result::Result<T, AsyncIoError>; |
| 84 | |
| 85 | pub trait AsyncIo: Send { |
| 86 | fn notifier(&self) -> &EventFd; |
| 87 | fn read_vectored( |
| 88 | &mut self, |
| 89 | offset: libc::off_t, |
| 90 | iovecs: &[libc::iovec], |
| 91 | user_data: u64, |
| 92 | ) -> AsyncIoResult<()>; |
| 93 | fn write_vectored( |
| 94 | &mut self, |
| 95 | offset: libc::off_t, |
| 96 | iovecs: &[libc::iovec], |
| 97 | user_data: u64, |
| 98 | ) -> AsyncIoResult<()>; |
| 99 | fn fsync(&mut self, user_data: Option<u64>) -> AsyncIoResult<()>; |
| 100 | fn punch_hole(&mut self, offset: u64, length: u64, user_data: u64) -> AsyncIoResult<()>; |
| 101 | fn write_zeroes(&mut self, offset: u64, length: u64, user_data: u64) -> AsyncIoResult<()>; |
| 102 | fn next_completed_request(&mut self) -> Option<(u64, i32)>; |
| 103 | fn batch_requests_enabled(&self) -> bool { |
| 104 | false |
| 105 | } |
| 106 | fn submit_batch_requests(&mut self, _batch_request: &[BatchRequest]) -> AsyncIoResult<()> { |
| 107 | Ok(()) |
| 108 | } |
| 109 | fn alignment(&self) -> u64 { |
| 110 | SECTOR_SIZE |
| 111 | } |
| 112 | } |
nothing calls this directly
no outgoing calls
no test coverage detected