pub trait MetadataFetch:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn fetch<'life0, 'async_trait>(
&'life0 self,
range: Range<u64>,
) -> Pin<Box<dyn Future<Output = AsyncTiffResult<Bytes>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A data source that can be used with TiffMetadataReader
and ImageFileDirectoryReader to load
ImageFileDirectorys.
Note that implementation is provided for AsyncFileReader.
Required Methods§
Sourcefn fetch<'life0, 'async_trait>(
&'life0 self,
range: Range<u64>,
) -> Pin<Box<dyn Future<Output = AsyncTiffResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch<'life0, 'async_trait>(
&'life0 self,
range: Range<u64>,
) -> Pin<Box<dyn Future<Output = AsyncTiffResult<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a future that fetches the specified range of bytes asynchronously
Note the returned type is a boxed future, often created by futures::FutureExt::boxed. See the trait documentation for an example.