[][src]Struct linux_aio_tokio::File

pub struct File { /* fields omitted */ }

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]

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]

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]

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]

Sync only data through AIO

See submit_request for more information

Trait Implementations

impl AsRawFd for File[src]

impl<'_> AsRawFd for &'_ File[src]

impl Debug for File[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.