pub trait TileSource {
// Required methods
fn size(&self) -> Option<[u32; 2]>;
fn request(&self, requests: Vec<TileRequest>);
// Provided method
fn readout(&self, pixel: [i64; 2]) { ... }
}Expand description
The application’s pixels. Every method returns at once; work happens
elsewhere and comes back through the TileSink.
Required Methods§
Sourcefn size(&self) -> Option<[u32; 2]>
fn size(&self) -> Option<[u32; 2]>
The image’s size in pixels, None while unknown. Cheap: read on
every frame.
Sourcefn request(&self, requests: Vec<TileRequest>)
fn request(&self, requests: Vec<TileRequest>)
New tiles wanted, most useful first. Requests the viewport stops
wanting get their CancelToken set.
Provided Methods§
Sourcefn readout(&self, pixel: [i64; 2])
fn readout(&self, pixel: [i64; 2])
The pointer is over pixel: answer with
TileSink::readout when the values are known (default: no
readout).