pub trait RasterStreaming: Send + Sync {
// Required methods
fn next_chunk<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<RasterChunk>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn next_chunks<'life0, 'async_trait>(
&'life0 mut self,
count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RasterChunk>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn seek_to_chunk<'life0, 'async_trait>(
&'life0 mut self,
row: usize,
col: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn total_chunks(&self) -> (usize, usize);
fn current_position(&self) -> (usize, usize);
fn has_more_chunks(&self) -> bool;
}Expand description
Async trait for raster streaming.
Required Methods§
Sourcefn next_chunk<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<RasterChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_chunk<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Option<RasterChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the next chunk from the stream.
Sourcefn next_chunks<'life0, 'async_trait>(
&'life0 mut self,
count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RasterChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn next_chunks<'life0, 'async_trait>(
&'life0 mut self,
count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<RasterChunk>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get multiple chunks in parallel.
Sourcefn seek_to_chunk<'life0, 'async_trait>(
&'life0 mut self,
row: usize,
col: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn seek_to_chunk<'life0, 'async_trait>(
&'life0 mut self,
row: usize,
col: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Skip to a specific chunk by index.
Sourcefn total_chunks(&self) -> (usize, usize)
fn total_chunks(&self) -> (usize, usize)
Get the total number of chunks.
Sourcefn current_position(&self) -> (usize, usize)
fn current_position(&self) -> (usize, usize)
Get the current position in the stream.
Sourcefn has_more_chunks(&self) -> bool
fn has_more_chunks(&self) -> bool
Check if the stream has more chunks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".