pub trait AioOpenOptionsExt {
// Required method
fn aio_open<'async_trait>(
self,
path: PathBuf,
is_sync: bool,
) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>
where Self: 'async_trait;
}
Expand description
Extension trait to OpenOptions
to support opening files
in AIO mode
Required Methods§
Sourcefn aio_open<'async_trait>(
self,
path: PathBuf,
is_sync: bool,
) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>where
Self: 'async_trait,
fn aio_open<'async_trait>(
self,
path: PathBuf,
is_sync: bool,
) -> Pin<Box<dyn Future<Output = Result<File>> + Send + 'async_trait>>where
Self: 'async_trait,
Opens a file at path
with the options specified by self
in direct mode
for usage with AIO. It always adds O_DIRECT
flag
If is_sync
is true, additionALLY O_SYNC
flag will be added
§Errors
Error codes are the same as in the tokio version