[−][src]Struct linux_aio_tokio::File
AIO version of tokio File
, to work through GenericAioContextHandle
Methods
impl File
[src]
pub async fn open(path: impl AsRef<Path>, is_sync: bool) -> Result<File>
[src]
Open the file. See tokio File::open
pub async fn create(path: impl AsRef<Path>, is_sync: bool) -> Result<File>
[src]
Open the file. See tokio File::create
pub async fn set_len<'_>(&'_ mut self, size: u64) -> Result<()>
[src]
Set file let. See tokio set_len
pub async fn metadata<'_>(&'_ self) -> Result<Metadata>
[src]
Retrieves file metadata. See tokio metadata
pub async fn set_permissions<'_>(&'_ self, perm: Permissions) -> Result<()>
[src]
Set file permissions. See tokio set_permissions
pub async fn read_at<'_, '_, '_, M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default>(
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>,
offset: u64,
buffer: &'_ mut LockedBuf,
len: u64,
flags: ReadFlags
) -> Result<u64, AioCommandError> where
A::LinkOps: LinkedListOps + Default,
[src]
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>,
offset: u64,
buffer: &'_ mut LockedBuf,
len: u64,
flags: ReadFlags
) -> Result<u64, AioCommandError> where
A::LinkOps: LinkedListOps + Default,
Read the file through AIO at offset
to the buffer
with provided flags
.
See submit_request
for more information
pub async fn write_at<'_, '_, '_, M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default>(
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>,
offset: u64,
buffer: &'_ LockedBuf,
len: u64,
flags: WriteFlags
) -> Result<u64, AioCommandError> where
A::LinkOps: LinkedListOps + Default,
[src]
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>,
offset: u64,
buffer: &'_ LockedBuf,
len: u64,
flags: WriteFlags
) -> Result<u64, AioCommandError> where
A::LinkOps: LinkedListOps + Default,
Write to the file through AIO at offset
from the buffer
with provided flags
.
See submit_request
for more information
pub async fn sync_all<'_, '_, M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default>(
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>
) -> Result<(), AioCommandError> where
A::LinkOps: LinkedListOps + Default,
[src]
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>
) -> Result<(), AioCommandError> where
A::LinkOps: LinkedListOps + Default,
Sync data and metadata through AIO
See submit_request
for more information
pub async fn sync_data<'_, '_, M: RawMutex, A: IntrusiveAdapter<M, L>, L: DefaultLinkOps<Ops = A::LinkOps> + Default>(
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>
) -> Result<(), AioCommandError> where
A::LinkOps: LinkedListOps + Default,
[src]
&'_ self,
aio_handle: &'_ GenericAioContextHandle<M, A, L>
) -> Result<(), AioCommandError> where
A::LinkOps: LinkedListOps + Default,
Sync only data through AIO
See submit_request
for more information
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl !UnwindSafe for File
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,