pub trait ImageResolver: Send + Sync {
// Required method
fn resolve(&self, id: ImageId) -> Option<Arc<Pixmap>>;
}Expand description
Trait for resolving opaque image IDs to pixmaps at rasterization time.
This allows delaying the resolution of ImageSource::OpaqueId until the
image is actually needed during rasterization, enabling patterns like
dynamic sprite atlases where the image data may be updated between
encoding and rendering.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".