Trait dezoomify_rs::dezoomer::TileProvider
source · pub trait TileProvider: Debug {
fn next_tiles(
&mut self,
previous: Option<TileFetchResult>
) -> Vec<TileReference> ⓘ;
fn post_process_fn(&self) -> PostProcessFn { ... }
fn name(&self) -> String { ... }
fn title(&self) -> Option<String> { ... }
fn size_hint(&self) -> Option<Vec2d> { ... }
fn http_headers(&self) -> HashMap<String, String> { ... }
}
Expand description
A single tiled image
Required Methods
sourcefn next_tiles(&mut self, previous: Option<TileFetchResult>) -> Vec<TileReference> ⓘ
fn next_tiles(&mut self, previous: Option<TileFetchResult>) -> Vec<TileReference> ⓘ
Provide a list of image tiles. Should be called repetitively until it returns an empty list. Each new call takes the results of the previous tile fetch as a parameter.
Provided Methods
sourcefn post_process_fn(&self) -> PostProcessFn
fn post_process_fn(&self) -> PostProcessFn
A function that takes the downloaded tile bytes and decodes them
sourcefn size_hint(&self) -> Option<Vec2d>
fn size_hint(&self) -> Option<Vec2d>
The width and height of the image. Can be unknown when dezooming starts
sourcefn http_headers(&self) -> HashMap<String, String>
fn http_headers(&self) -> HashMap<String, String>
A collection of http headers to use when requesting the tiles