vortex_serde::io

Trait VortexReadAt

Source
pub trait VortexReadAt: Send + Sync {
    // Required methods
    fn read_at_into(
        &self,
        pos: u64,
        buffer: BytesMut,
    ) -> impl Future<Output = Result<BytesMut>> + Send;
    fn size(&self) -> impl Future<Output = u64>;

    // Provided method
    fn performance_hint(&self) -> usize { ... }
}

Required Methods§

Source

fn read_at_into( &self, pos: u64, buffer: BytesMut, ) -> impl Future<Output = Result<BytesMut>> + Send

Source

fn size(&self) -> impl Future<Output = u64>

Size of the underlying file in bytes

Provided Methods§

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.

Implementations on Foreign Types§

Source§

impl VortexReadAt for Buffer

Source§

async fn read_at_into(&self, pos: u64, buffer: BytesMut) -> Result<BytesMut>

Source§

async fn size(&self) -> u64

Source§

impl VortexReadAt for Vec<u8>

Source§

fn read_at_into( &self, pos: u64, buffer: BytesMut, ) -> impl Future<Output = Result<BytesMut>>

Source§

async fn size(&self) -> u64

Source§

impl VortexReadAt for File

Source§

async fn read_at_into(&self, pos: u64, buffer: BytesMut) -> Result<BytesMut>

Source§

async fn size(&self) -> u64

Source§

impl VortexReadAt for [u8]

Source§

async fn read_at_into(&self, pos: u64, buffer: BytesMut) -> Result<BytesMut>

Source§

async fn size(&self) -> u64

Source§

impl<R: ?Sized + VortexReadAt> VortexReadAt for &R

Source§

fn read_at_into( &self, pos: u64, buffer: BytesMut, ) -> impl Future<Output = Result<BytesMut>> + Send

Source§

fn performance_hint(&self) -> usize

Source§

async fn size(&self) -> u64

Source§

impl<T: VortexReadAt> VortexReadAt for Arc<T>

Source§

fn read_at_into( &self, pos: u64, buffer: BytesMut, ) -> impl Future<Output = Result<BytesMut>> + Send

Source§

fn performance_hint(&self) -> usize

Source§

async fn size(&self) -> u64

Implementors§