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§
Sourcefn coalesce_window(&self) -> Option<CoalesceWindow>
fn coalesce_window(&self) -> Option<CoalesceWindow>
The coalescing window to use for this source, if any.
Sourcefn size(&self) -> BoxFuture<'static, VortexResult<u64>>
fn size(&self) -> BoxFuture<'static, VortexResult<u64>>
Returns a shared future that resolves to the byte size of the underlying data source.
Provided Methods§
Sourcefn drive_local(
self: Arc<Self>,
requests: BoxStream<'static, IoRequest>,
) -> LocalBoxFuture<'static, ()>
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.