- Added an extention trait:
AioFileExt
. It's implemented on everything that implementsAsFd
. Noteably, these methods use I/O safety, which the oldtokio_file::File
methods did not. (#53)
- Deprecated
File
. Use theAioFileExt
trait instead.
-
Rewrite
readv_at
andwritev_at
in terms ofaio_readv
andaio_writev
respectively, eliminating the oldlio_listio
based implementation. This means they won't work on less than FreeBSD 13.0. The native implementations are faster. They're also atomic, meaning that no other process will see part of thewritev_at
operation as complete but not all of it, and similarly forreadv_at
. They now take as arguments slices ofIoSliceMut
andIoSlice
, respectively, for better familiarity with the standard library.The return type of all futures is now either
usize
or()
instead of the oldAioResult
enum.Finally, each asynchronous method now returns a distinct
Future
type, rather than all of them returning anAioFut
.Also,
tokio-file
now generates less memory allocator activity, thanks to matching changes in its dependencies. (#34) -
The error type of all futures is now
io::Result
. This should make consumers' builds less dependent on the precise version of Nix in use. (#39) -
Updated Nix to 0.26.1. (#38)
-
Update Nix and mio-aio dependencies. See mio-aio (#[38](asomers/mio-aio#38 for motivation.)). (#45)
readv_at
andwritev_at
now require at least FreeBSD 13.0, and they no repack buffers to meet device alignment requirements. (#34)
-
Updated the MSRV to 1.49.0, because Tokio did. (#30)
-
Updated Nix to 0.24.0. This raises the MSRV to 1.46.0 (#31)
- Updated Nix to 0.22.0. This changes tokio-file's error types, because we reexport from Nix. (#21)
- Fixed
lio_listio
resubmission with Tokio 1.13.0 and later. (#28)
- Updated to Future 0.3,
std::future
, and Tokio 0.2. Now tokio-file's futures can be used with async/await. All methods now use borrowed buffers rather than owned buffers. (#15)
- Fixed
readv_at
on device nodes with unaligned buffers (#13)
File
now implementsAsRawFd
.LioFut
's Item type is nowLioResult
, which indicates which operations passed and which failed.File::len
gets the file length, whether a regular file or device nodeFile::{readv_at, writev_at}
now work better with device nodes.
LioFut
no longer implementsDebug
.
File::new
allows creating a tokio file object from an arbitrarystd::fs::File
.
open
no longer takes aHandle
argument.
- Added
File::readv_at
andFile::writev_at
- Added
File::metadata
- Implement
Debug
forFile
.
read_at
andwrite_at
no longer take buffers asRc<Box<u8]>>
. Instead, they useBox<Borrow<[u8]>>
orBox<BorrowMut<[u8]>>
.read_at
,write_at
, andsync_all
now return the sameFuture
type. It's result is anAioResult
, which includes the original buffer as well as the underlying AIO function's return value.- Switch from using
tokio-core
to the newertokio
. - Raise minimum version of
mio
to 0.6.13.
- Don't ignore errors from
aio_read
,aio_write
, andaio_fsync
.