ReadSource

Trait ReadSource 

Source
pub trait ReadSource: Send + Sync {
    // Required methods
    fn uri(&self) -> &Arc<str>;
    fn coalesce_window(&self) -> Option<CoalesceWindow>;
    fn size(&self) -> BoxFuture<'static, VortexResult<u64>>;
    fn drive_send(
        self: Arc<Self>,
        requests: BoxStream<'static, IoRequest>,
    ) -> BoxFuture<'static, ()>;

    // Provided method
    fn drive_local(
        self: Arc<Self>,
        requests: BoxStream<'static, IoRequest>,
    ) -> LocalBoxFuture<'static, ()> { ... }
}
Expand description

An object-safe trait representing an open file-like I/O object for reading.

Required Methods§

Source

fn uri(&self) -> &Arc<str>

The URI of this source, for logging and debugging purposes.

Source

fn coalesce_window(&self) -> Option<CoalesceWindow>

The coalescing window to use for this source, if any.

Source

fn size(&self) -> BoxFuture<'static, VortexResult<u64>>

Returns a shared future that resolves to the byte size of the underlying data source.

Source

fn drive_send( self: Arc<Self>, requests: BoxStream<'static, IoRequest>, ) -> BoxFuture<'static, ()>

Drive a stream of I/O requests to completion.

Provided Methods§

Source

fn drive_local( self: Arc<Self>, requests: BoxStream<'static, IoRequest>, ) -> LocalBoxFuture<'static, ()>

Drive a stream of I/O requests to completion on the local thread.

Implementations on Foreign Types§

Source§

impl ReadSource for ByteBuffer

Source§

fn uri(&self) -> &Arc<str>

Source§

fn coalesce_window(&self) -> Option<CoalesceWindow>

Source§

fn size(&self) -> BoxFuture<'static, VortexResult<u64>>

Source§

fn drive_send( self: Arc<Self>, requests: BoxStream<'static, IoRequest>, ) -> BoxFuture<'static, ()>

Implementors§