pub trait ThumbnailProvider: Send + Sync {
// Required method
fn request(&self, ctx: &Context, request: &ThumbRequest<'_>) -> ThumbState;
// Provided methods
fn begin_frame(&self, _ctx: &Context) { ... }
fn end_frame(&self, _ctx: &Context) { ... }
fn cancel(&self, _path: &Path) { ... }
}Expand description
Makes thumbnails off the interface thread. A frame starts with
ThumbnailProvider::begin_frame, asks with
ThumbnailProvider::request, and ends with
ThumbnailProvider::end_frame: a request not renewed in a frame is
cancelled, so what scrolled away leaves the queue without the mode’s help.
Required Methods§
Sourcefn request(&self, ctx: &Context, request: &ThumbRequest<'_>) -> ThumbState
fn request(&self, ctx: &Context, request: &ThumbRequest<'_>) -> ThumbState
Answers at once from what is made; never blocks the frame.