Skip to main content

RandomReadBlobAsync

Trait RandomReadBlobAsync 

Source
pub trait RandomReadBlobAsync {
    type ReadFuture<'a, 'b>: Future<Output = Result<usize>>
       where Self: 'a;
    type ReadVecFuture<'a, 'b, 'bb>: Future<Output = Result<usize>>
       where Self: 'a,
             'bb: 'b;

    // Required methods
    fn read_async<'a, 'b>(
        &'a self,
        offs: u64,
        buf: &'b mut [MaybeUninit<u8>],
    ) -> Self::ReadFuture<'a, 'b>;
    fn readv_async<'a, 'b, 'bb>(
        &'a self,
        offs: u64,
        iovecs: &'b mut [IoSliceMut<'bb>],
    ) -> Self::ReadVecFuture<'a, 'b, 'bb>;

    // Provided methods
    fn read_exact_async<'a, 'b>(
        &'a self,
        offs: u64,
        buf: &'b mut [MaybeUninit<u8>],
    ) -> impl Future<Output = IOResult<()>> + use<'a, 'b, Self> { ... }
    fn readv_all_async<'a, 'b, 'bb>(
        &'a self,
        offs: u64,
        iovecs: &'b mut [IoSliceMut<'bb>],
    ) -> impl Future<Output = Result<()>> + use<'a, 'b, 'bb, Self> { ... }
    fn read_to_end_async<'a>(
        &'a self,
        offs: u64,
    ) -> impl Future<Output = IOResult<Vec<u8>>> + use<'a, Self> { ... }
}
Expand description

Read-only random accessible Blob operations(asynchronous).

Required Associated Types§

Source

type ReadFuture<'a, 'b>: Future<Output = Result<usize>> where Self: 'a

Source

type ReadVecFuture<'a, 'b, 'bb>: Future<Output = Result<usize>> where Self: 'a, 'bb: 'b

Required Methods§

Source

fn read_async<'a, 'b>( &'a self, offs: u64, buf: &'b mut [MaybeUninit<u8>], ) -> Self::ReadFuture<'a, 'b>

Source

fn readv_async<'a, 'b, 'bb>( &'a self, offs: u64, iovecs: &'b mut [IoSliceMut<'bb>], ) -> Self::ReadVecFuture<'a, 'b, 'bb>

Provided Methods§

Source

fn read_exact_async<'a, 'b>( &'a self, offs: u64, buf: &'b mut [MaybeUninit<u8>], ) -> impl Future<Output = IOResult<()>> + use<'a, 'b, Self>

Source

fn readv_all_async<'a, 'b, 'bb>( &'a self, offs: u64, iovecs: &'b mut [IoSliceMut<'bb>], ) -> impl Future<Output = Result<()>> + use<'a, 'b, 'bb, Self>

Source

fn read_to_end_async<'a>( &'a self, offs: u64, ) -> impl Future<Output = IOResult<Vec<u8>>> + use<'a, Self>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'t, T> RandomReadBlobAsync for &'t T
where T: RandomReadBlobAsync + ?Sized + 't,

Source§

type ReadFuture<'a, 'b> = <T as RandomReadBlobAsync>::ReadFuture<'a, 'b> where Self: 'a

Source§

type ReadVecFuture<'a, 'b, 'bb> = <T as RandomReadBlobAsync>::ReadVecFuture<'a, 'b, 'bb> where Self: 'a, 'bb: 'b

Source§

fn read_async<'a, 'b>( &'a self, offs: u64, buf: &'b mut [MaybeUninit<u8>], ) -> Self::ReadFuture<'a, 'b>

Source§

fn readv_async<'a, 'b, 'bb>( &'a self, offs: u64, iovecs: &'b mut [IoSliceMut<'bb>], ) -> Self::ReadVecFuture<'a, 'b, 'bb>

Source§

fn read_exact_async<'a, 'b>( &'a self, offs: u64, buf: &'b mut [MaybeUninit<u8>], ) -> impl Future<Output = IOResult<()>> + use<'a, 'b, 't, T>

Source§

fn read_to_end_async<'a>( &'a self, offs: u64, ) -> impl Future<Output = IOResult<Vec<u8>>> + use<'a, 't, T>

Source§

fn readv_all_async<'a, 'b, 'bb>( &'a self, offs: u64, iovecs: &'b mut [IoSliceMut<'bb>], ) -> impl Future<Output = Result<()>> + use<'a, 'b, 'bb, 't, T>

Implementors§

Source§

impl RandomReadBlobAsync for NativeFileAsyncBlobRandomReader

Source§

type ReadFuture<'a, 'b> = AsyncNativeFileReadFuture<'a, 'b> where Self: 'a

Source§

type ReadVecFuture<'a, 'b, 'b2> = AsyncNativeFileReadVecFuture<'a, 'b, 'b2> where Self: 'a, 'b2: 'b