Trait AsyncFile

Source
pub trait AsyncFile {
    type Operation<'a>: AsyncOperation
       where Self: 'a;

    // Required methods
    fn read<'a>(
        &'a mut self,
        offset: u64,
        buffer: &'a mut [u8],
    ) -> Result<Self::Operation<'a>>;
    fn write<'a>(
        &'a mut self,
        offset: u64,
        buffer: &'a [u8],
    ) -> Result<Self::Operation<'a>>;
}

Required Associated Types§

Source

type Operation<'a>: AsyncOperation where Self: 'a

Required Methods§

Source

fn read<'a>( &'a mut self, offset: u64, buffer: &'a mut [u8], ) -> Result<Self::Operation<'a>>

Source

fn write<'a>( &'a mut self, offset: u64, buffer: &'a [u8], ) -> Result<Self::Operation<'a>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§