pub trait ScanDriver: Sized + 'static {
// Required methods
fn segment_reader(&self) -> Arc<dyn AsyncSegmentReader>;
fn io_stream(self) -> impl Stream<Item = Result<(), VortexError>> + 'static;
}
Required Methods§
fn segment_reader(&self) -> Arc<dyn AsyncSegmentReader>
Sourcefn io_stream(self) -> impl Stream<Item = Result<(), VortexError>> + 'static
fn io_stream(self) -> impl Stream<Item = Result<(), VortexError>> + 'static
Return a future that drives the I/O stream for the segment reader. The future should return when the stream is complete, and can return an error to terminate the scan early.
It is recommended that I/O is spawned and processed on its own thread, with this driver serving only as a mechanism to signal completion or error. There is no guarantee around how frequently this future will be polled, so it should not be used to drive I/O.
TODO(ngates): make this a future
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.